October 20, 2008 at 10:15 am
importing txt files to sql tables
1.everyday filename will change
for example sample file name ----
nn_10202008001
tt_10202008001
2. everyday there will be one set or two or may be many set for import
for example sample file names ----
nn_10202008001
tt_10202008001
nn_10202008002
tt_10202008002
3. import nn_ file/s to newnote table & tt_file/s to transfertake table.
4. How to achieve this is SQL 2000 DTS
thanks
October 20, 2008 at 2:01 pm
Hi,
The only way I see in SQL Server 2000 is to write an activex script. I dont have the code to paste it here, as I have worked a long back on this. First is you need to make sure all files are posted in one directory.
Second write an activex to store the name of files in one txt file. Third read the file name from this txt file, as and when you read the filename, after completion delete the line from the text file. Trust me, this method will work. This also needs you to be aware of write a windows batch file. Its a little tidious job, but a combination of Batchfile, Activex sripts.
Regards,
Rajesh
October 20, 2008 at 5:09 pm
hmmmm
is there any otherway?
October 23, 2008 at 7:42 pm
Yeah... but do you need to use DTS or SSIS or is doing it all in T-SQL without the use of xp_CmdShell ok?
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply