..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..
Extarction using User Defined Query ( DB2 EE and DB2 Api )
Moderators: chulett, rschirm, roy
-
- Charter Member
- Posts: 38
- Joined: Wed Mar 17, 2004 1:16 am
- Location: USA
Extarction using User Defined Query ( DB2 EE and DB2 Api )
..i did not invent many things..but i can make them Better..
-
- Charter Member
- Posts: 38
- Joined: Wed Mar 17, 2004 1:16 am
- Location: USA
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)...
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..