Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
I think isnull() function not support in sql server.
Regards
Ashish Srivastava
Hi Ashish,
Thanks for you reply. I think you did not get my question right.
I am loading the data through the qlikview load statement instead of the sql statement. So just wanted to know what will happen to the where condition condition.
Does the load statement works only after the sql statement gets executed with the where condition. Please explain!
isnull() function is allowed in sql server and able to execute the query without any issues.
Do reply!
Hi,
Your where condition will work which you have written in the Sql Statement. Data will be loaded on the basis of the result from the Sql Statement.
Hi Manish,
Thanks for your reply. So you mean to say that there is no need of writing where condition in LOAD statement again.
I couldn't understand why you are trying to do it in load statement? You can do the concatenation in SQL statement.
Regards,
Shumail
Hi Shumail,
That's true that could have been done in the SQL statement itself. I just wanted to know when we are loading the data using the load statement does it loads the data from the sql statement or not. There is where condition there in the sql statement. So wanted to know do we need to write the where condition in the load statement also.
Hi Shumail,
Do you have experience in working the loosely coupled. If you please help me out here.
Yeah, there is no need to write Where Condition in Load coz it will load only those values that returned from your Sql Statement.
Hi Manish,
Thanks for your help. Can you please help me out here if you can.