Update Query in TI Process data tab

Post Reply
manoj928
Posts: 60
Joined: Thu Mar 17, 2011 2:13 pm
OLAP Product: IBM Cognos TM1
Version: 10.2.1
Excel Version: 2010

Update Query in TI Process data tab

Post 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.
User avatar
Michel Zijlema
Site Admin
Posts: 712
Joined: Wed May 14, 2008 5:22 am
OLAP Product: TM1, PALO
Version: both 2.5 and higher
Excel Version: 2003-2007-2010
Location: Netherlands
Contact:

Re: Update Query in TI Process data tab

Post 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
Post Reply