Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 Large # of columns, or 1 col w delimited keys

Author  Topic 

cuibel
Starting Member

1 Post

Posted - 2009-03-01 : 19:17:13
Hi,
I'm already getting spam from this post from 2 days ago. Thanks, sqlteam.

I'm importing a sports spreadsheet with 200 yes/no columns into SQL.
Each column header is the name of a different sport.

I'm importing all this into one column in a SQL table.

The one column in the Sql table holds a pipe-delimited group of keys that were selected as Y in the spreadsheet.

so a field in the new Sql Table may look like this:

1|3|19|199
each number is a sport that was checked off in the spreadsheet.

I'm looking for the best way to import these and convert to the new format. Some import script or something.
Any thoughts?
Thanks


visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-03-02 : 10:51:22
isnt it better to keep the sport details in seperate table and represent the one to many relationship by means of bridge table?
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-03-02 : 10:54:37
Use staging area to import data and the use database normalization to store the data.
See http://www.datamodel.org/NormalizationRules.html



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page
   

- Advertisement -