9 Replies Latest reply: Jul 21, 2010 9:16 AM by At titude RSS

    Where condition when the data is loaded from sql statement

      Hi All,

       


      sql select
      right('0000000000'+rtrim(cast(n_srno as varchar(10))),10)+c_doc_code as dwrkey,
      c_item_code itemcode, n_product_unit sampleqty
      from Tbl_DWR_Sub_Details where isnull(c_item_code,'')<>'';


      If I want to concatenate the above dwrkey and itemcode as shown below then what will happen to the where condition which is there in the sql select statement.

      I did some thing like the below one:

       


      dwrsamples:
      Load dwrkey & '|' & itemcode as %key,sampleqty;
      sql select
      right('0000000000'+rtrim(cast(n_srno as varchar(10))),10)+c_doc_code as dwrkey,
      c_item_code itemcode, n_product_unit sampleqty
      from Tbl_DWR_Sub_Details where isnull(c_item_code,'')<>'';


      Let me know if I do like this what will happen to the where condition which is there in the sql statement. Will that where condition will not be executed? Please explain!