If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > How to setup col's length in CLP, like oracle "col field1 for a12" in sqlplus?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-01-07, 01:16
hkzz hkzz is offline
Registered User
 
Join Date: Dec 2005
Posts: 6
How to setup col's length in CLP, like oracle "col field1 for a12" in sqlplus?

I executed a sql in CLP. OS: windows DB2v9.1

db2>select * from applications

Display result:
SNAPSHOT_TIMESTAMP CLIENT_DB_ALIAS



APPL_STATUS STATUS_CHANGE_TIME SEQUENCE_N
CLIENT_PID CLIENT_PLATFORM CLIENT_PROTOCOL CLIENT_NNAME
NODE_NUM COORD_AGENT_PID NUM_ASSOC_AGENTS TPMON_CLIENT_USERID
......
2007-06-01-10.57.25.314078 SAMPLE9



UOWEXEC - 0006
5044 NT TCPIP4 ZZ
0 2736 1 -

How it can be:
SNAPSHOT_TIMESTAMP CLIENT_DB_ALIAS APPL_STATUS...
2007-06-01-10.57.25.314078 SAMPLE9 UOWEXEC ...

Thanks,
Reply With Quote
  #2 (permalink)  
Old 06-01-07, 07:53
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Do not use "select *". You can use something like:

select snapshot_timestamp,varchar(client_db_alias,20) as client_db_alias, ...


Andy
Reply With Quote
  #3 (permalink)  
Old 06-06-07, 23:34
hkzz hkzz is offline
Registered User
 
Join Date: Dec 2005
Posts: 6
Thanks, Andy
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On