If you are unable to create a new account, please email support@bspsoftware.com

 

TRIM() function not working with for SQL query

Started by LEO, 14 Aug 2013 12:25:59 AM

Previous topic - Next topic

LEO

Hi,

I am using IBM i Access ODBC Driver for accessing DB2 for i5/OS.

With COGNOS SQL option in Data manager, If I am writing a query using a TRIM():

select PLSOUR,TRIM(PLSOUR)from TBL

Query fails and in driver log, the above SQL query is translated as below.

8/7/2013  9:55:56.49 AM    ODBC              32-bit  P=BFC  T=1BC  input statement text is: select "PLSOUR", trim_both_spaces("PLSOUR") from "TBL"

However, If i write query: select PLSOUR,LTRIM(PLSOUR)from TBL

Query succeeds and in log, the above SQL query is translated as below.

8/7/2013  9:32:08.53 AM    ODBC              32-bit  P=BFC  T=1BC  input statement text is: select "PLSOUR", LTRIM("PLSOUR") from "TBL"

I tried changing the cogdmod.ini file and cogdmd2.ini file to check if there are any options related to TRIM() enabling but didn't worked.

Which .ini file i may need to change to make TRIM work? LTRIM and RTRIM() are working perfectly.

MFGF

Hi,

Any reason you've started a new topic for this? Other than the suggestions I already made, I have no other ideas, sorry. I think you're going to have to log this one with the guys on the IBM support desk to see if they can advise.

Cheers!

MF.
Meep!

LEO

Hi MF

yes, i thought it has to be placed under SQL query category and didn't knew how to move the the old thread...so re-posted.
As suggested, i have asked for logging a case with IBM support..yet to get some reply.
Will post once i get reply.