all groups > sql server dts > november 2005 >
You're in the

sql server dts

group:

Help on DTS ..



Help on DTS .. hangar18
11/25/2005 1:21:07 AM
sql server dts: 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
Re: Help on DTS .. denis.gobo NO[at]SPAM gmail.com
11/25/2005 5:17:43 AM
You have a lot of questions, the answer to all your questions is yes
I would suggest to spend some time on http://www.sqlis.com/ and on
http://msdn2.microsoft.com/en-us/library/ms141026.aspx

For the File watcher see (http://www.sqlis.com/default.aspx?23)

------------------------------------------------------------------------------------------------------
http://sqlservercode.blogspot.com/
AddThis Social Bookmark Button