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

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
srikanthd1978
Charter Member
Charter Member
Posts: 38
Joined: Wed Mar 17, 2004 1:16 am
Location: USA

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

Post 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..
..i did not invent many things..but i can make them Better..
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

can you post the query please.
srikanthd1978
Charter Member
Charter Member
Posts: 38
Joined: Wed Mar 17, 2004 1:16 am
Location: USA

Post 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)...
..i did not invent many things..but i can make them Better..
Post Reply