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 > split table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-22-04, 05:38
blom0344 blom0344 is offline
Registered User
 
Join Date: Jan 2003
Location: Zutphen,Netherlands
Posts: 256
split table

I have one Human Resource table that consists of 380 columns.
Exporting the data to Excel / Access fails, because there are too many columns.

Can anyone think of a FAST way to split the table into 2 seperate entities to be able to export the data?

I am out of inspiration on this one............
__________________
Ties Blom
Senior Application Developer BI
Getronics Healthcare
DB2,ORACLE,Powercenter,BusObj,Access,
SQL, SQL server
Reply With Quote
  #2 (permalink)  
Old 04-22-04, 05:47
hurmavi hurmavi is offline
Registered User
 
Join Date: Jan 2004
Location: Europe, Finland, Helsinki
Posts: 60
Re: split table

Quote:
Originally posted by blom0344
I have one Human Resource table that consists of 380 columns.
Exporting the data to Excel / Access fails, because there are too many columns.

Can anyone think of a FAST way to split the table into 2 seperate entities to be able to export the data?

I am out of inspiration on this one............
Hi!

Get the DDL out, edit it and create 2 or more DB2 views. That's teh way I have done things like that.

Cheers, Bill
Reply With Quote
  #3 (permalink)  
Old 04-22-04, 09:32
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Re: split table

Quote:
Originally posted by blom0344
I have one Human Resource table that consists of 380 columns.
Exporting the data to Excel / Access fails, because there are too many columns.

Can anyone think of a FAST way to split the table into 2 seperate entities to be able to export the data?

I am out of inspiration on this one............
I'm not sure I understand your problem clearly... Is there anything that prevents you from specifying only some of the columns during export?

EXPORT TO '/tmp/test.csv' OF DEL
SELECT FIELD1, FIELD2, .., FIELD150 FROM STRANGE_TABLE...
Reply With Quote
  #4 (permalink)  
Old 04-22-04, 09:52
blom0344 blom0344 is offline
Registered User
 
Join Date: Jan 2003
Location: Zutphen,Netherlands
Posts: 256
Talking

Well, I suggested they (= Human resources) would come up with a list of fields for me to select. But the lazy buggers decided they wanted all 380 fields whereas two-thirds is meaningless.

No user-group as useless as these no-brainers
__________________
Ties Blom
Senior Application Developer BI
Getronics Healthcare
DB2,ORACLE,Powercenter,BusObj,Access,
SQL, SQL server
Reply With Quote
  #5 (permalink)  
Old 04-22-04, 10:06
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally posted by blom0344
Well, I suggested they (= Human resources) would come up with a list of fields for me to select. But the lazy buggers decided they wanted all 380 fields whereas two-thirds is meaningless.

No user-group as useless as these no-brainers
Hey, careful there - they manage your benefits :-)

I just checked my Excel - it has a limitation of 256 fields per worksheet (Excel 2002). It looks like your HR people are out of luck.

You could still export your data into two separate csv files and import them into two separate Excel worksheets...
Reply With Quote
  #6 (permalink)  
Old 04-22-04, 10:15
MahendraSetty MahendraSetty is offline
Registered User
 
Join Date: Apr 2004
Posts: 48
Try creating 2-3 views or try extracting 2 -3 sets of data having say 100 columns and then export it to excel and maybe you can create multiple worksheets if you use up all the columns in 1 worksheet.
Reply With Quote
  #7 (permalink)  
Old 04-22-04, 10:48
blom0344 blom0344 is offline
Registered User
 
Join Date: Jan 2003
Location: Zutphen,Netherlands
Posts: 256
Quote:
Originally posted by MahendraSetty
Try creating 2-3 views or try extracting 2 -3 sets of data having say 100 columns and then export it to excel and maybe you can create multiple worksheets if you use up all the columns in 1 worksheet.
I messed around with the tables DDL and split everything in half, using pass-through queries in access, making sure to incorporate the primary key in both subsets.

It ain't pretty ,but they will have to live with it....
__________________
Ties Blom
Senior Application Developer BI
Getronics Healthcare
DB2,ORACLE,Powercenter,BusObj,Access,
SQL, SQL server
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