on 06-22-2016 3:00 PM
Hi Experts,
I need to fetch the value from database table and store it in variable to do further process.
Using Scripts and SQL query option in SAP BODS.
Script used:
$L_Output = sql('Datastore_Name','select sno from xx_table where c_xx = \'21-JUN-16\'');
This results NULL as output. Can you please suggest.
Thanks,
Pradheep S
Data types?!
Are $L_Output and sno of same type?
Is c_xx of type varchar? And is the date stored in exactly that format?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Two observations:
1/. Result of SQL function is varchar. Something may go wrong in the implicit conversion from varchar result to int variable. Try print(sql('Datastore_Name','select sno from xx_table where c_xx = \'21-JUN-16\''));
2/. $L_Output is a local variable and you're referring to it from within a different scope. Try with a global variable.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.