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 reorder columns in an existing table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-14-04, 12:53
globetrotcom globetrotcom is offline
Registered User
 
Join Date: Jan 2004
Posts: 23
How to reorder columns in an existing table

DB2 V7.2 on Windows 2000

I'd appreciate any help in reordering columns in an existing table with data in it.

"DB2 Help" says that you can reorder columns only amongst other new columns that are being added!

Is there any work-around this?

I need to do this because I am exporting data, in IXF format, from one table in one database to another table, in another database, with same columns but in different order.

Thanks
Reply With Quote
  #2 (permalink)  
Old 01-14-04, 12:59
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Re: How to reorder columns in an existing table

You can create a view over the base table with the order of columns you want or when exporting give columns in the select list in the order you want
HTH

Sathyaram

Quote:
Originally posted by globetrotcom
DB2 V7.2 on Windows 2000

I'd appreciate any help in reordering columns in an existing table with data in it.

"DB2 Help" says that you can reorder columns only amongst other new columns that are being added!

Is there any work-around this?

I need to do this because I am exporting data, in IXF format, from one table in one database to another table, in another database, with same columns but in different order.

Thanks
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
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