Help on DTS .. -
11-25-2005
, 03:21 AM
Hi,
We have a scenario where in we have to import data from an excel and
dump the data to the DB(SQL 2005).
To give u a brief
Assume you have this table in the DB
EmployeeTB
Columns are
EmpID,(int,identity)
CompanyID(int)
Name(varchar)
Active(bit)
The rows in the Excel file are like this...
CompanyName EmpName Active
Comp 1 Emp 1 Yes
Comp 1 Emp 2 Yes
Comp 2 Emp 3 No
Now can I have DTS Package to dump this data into my EmployeeTB format?
How will I get the CompanyId from the CompanyName in DTS?
Can we/do we write a query to get the companyID from the CompanyName?
How will I convert "yes/No" to a bit field in DTS?
Another query is...
This csv file will be in a folder.
I need this to be a back end process. So can I schedule the DTS
process?
Or does SQL have some kind of a file watcher sothat whenever a file is
created in this folder, the package runs automatically?
Or Do i need to write a file watcher service in .NET? If so is it
possible to execute the DTS package from my .NET code?
Thanks in advance,
Soni |