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.
Author |
Topic |
10Dawg
Starting Member
46 Posts |
Posted - 2011-12-14 : 14:54:09
|
I have 3 tables (.xls) I want to merge in sql. 1-I need to create a database with tbl01. tbl01 has a ContactID and AccountID among many other fields.2- I need to merge tbl02 with tbl01 with the common field of AccountID.3- I need to merge tbl03 with tbl01 with the common field of ContactID.BTW, there is a many to one ratio, Contact>Account. How do I sort this out?10Dawg |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-15 : 00:02:41
|
two methods1. export all excel sheets to sql staging tables using export/import wizard and then use join between them2. use OPENROWSET to pull data from different sheets and do the joini prefer method 1 as join involving OPENROWSET can be slow especially when amount of data is large------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
10Dawg
Starting Member
46 Posts |
Posted - 2011-12-16 : 10:58:24
|
Sorry but I'm a newie to programming. How do I use sql staging tables? Also I was told today that all the comments per each contact need to be in the same (cell) divided by a delimeter (let's say a colon : ). Is there a link or book that has this situation as a project that I can follow along and adapt to my situation?10Dawg |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|