Page 1 of 1

Extarction using User Defined Query ( DB2 EE and DB2 Api )

Posted: Tue Feb 28, 2006 2:34 pm
by srikanthd1978
..i have a user defined query that i am executing in my DB2 API, where i am doing a "left justify zero fill " of say a field X of Datatype Varchar(30)..
I use the ltrim, rtrim, repeat , length functions and do a concatenation..the output is also a Char(30)...no probs..i am getting the desired output..

can i do the same thing with DB2 Enterprise..what are the pros and cons if any..

..i tried the same SQL with DB2 Enterprise and i get the following error when i view the data from DB2 EE...

Error executing View Data command:

##E TNDB 000267 15:23:28(018) <XX_Table> 457: type not supported.

thanks..

Posted: Tue Feb 28, 2006 6:25 pm
by DSguru2B
can you post the query please.

Posted: Wed Mar 01, 2006 7:40 am
by srikanthd1978
the query is

Select
rtrim(ltrim(a.clmna))|| repeat(' ',30-length(rtrim(ltrim(a.clmna)))) as X,
rtrim(ltrim(a.clmnb))|| repeat(' ',30-length(rtrim(ltrim(a.clmnb)))) as Y,

from

DB_Test.Table as A;

the metadata for clmn X and Y is Varchar(30)...