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 |
sgandhi
Posting Yak Master
115 Posts |
Posted - 2009-02-10 : 10:44:54
|
Hi, I have muliple excel files, which i want to load into 1 tablethe excel files are by countryeg:China.xlsJapan.xlsIndia.xlsLoad into table called tbl_countrysNow the thing is that all excel files have different columns which is ok cos i can map that, but i want to run this from a SQL Agent Job adhoc, for 1 country at a time which i want to specify as loading the data into the table is random. How do i do that. I dont know how to do this besides making different packages for each country. Is there another way to do this. I am using SQL Server 2005, on 64bit.Please help |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-10 : 10:46:58
|
does your table hold all columns from all the files? |
 |
|
sgandhi
Posting Yak Master
115 Posts |
Posted - 2009-02-10 : 10:48:33
|
quote: Originally posted by visakh16 does your table hold all columns from all the files?
No, it can have nulls |
 |
|
Nagaraj
Starting Member
14 Posts |
Posted - 2009-02-12 : 01:01:17
|
Use for each loopNagaraj. |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-12 : 10:50:31
|
quote: Originally posted by sgandhi
quote: Originally posted by visakh16 does your table hold all columns from all the files?
No, it can have nulls
nope, i was asking does table have fields to contain all columns from all tables? suppose if each files have 5 columns each , then your table should have 15 columns, unless some of columns in files are same. |
 |
|
sgandhi
Posting Yak Master
115 Posts |
Posted - 2009-02-12 : 11:56:03
|
Yes it does have all columns from all tables.quote: Originally posted by visakh16
quote: Originally posted by sgandhi
quote: Originally posted by visakh16 does your table hold all columns from all the files?
No, it can have nulls
nope, i was asking does table have fields to contain all columns from all tables? suppose if each files have 5 columns each , then your table should have 15 columns, unless some of columns in files are same.
|
 |
|
|
|
|
|
|