Page 1 of 1

Update Query in TI Process data tab

Posted: Tue Jun 30, 2015 3:27 pm
by manoj928
Hello All,

Need a quick help.

I have below statement in data tab but whenever i run the TI Process i get an error of SQL invalidity.

sql= 'UPDATE MON_SAL SET UPI = get_decryption(UPI) WHERE UPI IS NOT NULL AND month =''APR'' and year = 2015';

ODBCoutput(strOrcDB, EXPAND(sql));


Please let me know what wrong with this code.

Thanks.

Re: Update Query in TI Process data tab

Posted: Wed Jul 01, 2015 7:16 am
by Michel Zijlema
manoj928 wrote:Hello All,

Need a quick help.

I have below statement in data tab but whenever i run the TI Process i get an error of SQL invalidity.

sql= 'UPDATE MON_SAL SET UPI = get_decryption(UPI) WHERE UPI IS NOT NULL AND month =''APR'' and year = 2015';

ODBCoutput(strOrcDB, EXPAND(sql));


Please let me know what wrong with this code.

Thanks.
I don't know why you enclosed the string APR in double single quotes, you can leave those out. Also the Expand function is not required here.
You could try:

Code: Select all

sql= 'UPDATE MON_SAL SET UPI = get_decryption(UPI) WHERE UPI IS NOT NULL AND month = APR and year = 2015';
ODBCoutput(strOrcDB, sql);
Michel