Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old September 4th, 2008, 07:58 AM
Newbie
 
Join Date: Sep 2008
Location: Hyderabad
Age: 25
Posts: 3
Default Problem in getting the columns name in export command

Hi All,

I am migrating the data from DB2 to oracle 10g. while exporting data from DB2 to some external files, i am able to export the data but when i want to export the data with columns name i tried this query( Intending to append the data file with the column file)

for data file:

1. db2 'EXPORT TO D:\Exp_files\Exp_Tables\exp_cust_details.csv OF DEL select * from tabschema.tabname

for column file:
2. db2 EXPORT TO D:\Exp_files\exp_custHead_details.txt OF DEL modified by chardel"" coldel,decpt.datesiso decplusblank SELECT SUBSTR(REPLACE(REPLACE(XMLSERIALIZE(CONTENT XMLAGG(XMLELEMENT(NAME c,colname) ORDER BY colno) AS VARCHAR(100)),'<C>',','),'</C>',''),3) FROM syscat.columns WHERE tabschema='XXXX' AND tabname='CUSTOMER_DETAILS'

Then i am getting this error:

SQL3183W Multiple delimiter overrides in the filetmod parameter are not seperated by blanks.

SQL3100W column number '1' (identified as "1") in the output DEL format file is longer than 254 bytes.

I think all the columns name are cummulated in one single column.

Please help with this query

Regards,
Syed.
Reply
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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 Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles