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 |
bridge
Yak Posting Veteran
93 Posts |
Posted - 2005-10-27 : 01:22:21
|
I have a DTS package that imports data from a txt file to a SQL Server table. But when the txt file has 0 byte its gives error when the DTS Step is executed. Is there any way it does not report any error when importing data from a 0 byte file. |
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2005-10-27 : 01:56:22
|
there shouldn't be any error...try nr's bcp routine http://www.mindsdoor.netor post your statements and error message--------------------keeping it simple... |
 |
|
bridge
Yak Posting Veteran
93 Posts |
Posted - 2005-10-27 : 02:43:48
|
execute this scriptcreate table Export( test_id int not null primary key clustered, test_dsc varchar(15))create table Import( test_id int not null primary key clustered, test_dsc varchar(15))insert into Exportselect 1, 'Export-1' union allselect 2, 'Export-2'now make a DTS package. Firstly take SQL Server as source and Export.txt as destination and export data from Export table to Export.txt.Now take Export.txt as source and SQL Server as destination and import data from Export.txt into Import table.Now execute the command delete exportthen Execute the Export Step and import step. This time on import step you'll get the error.I want to know is there any way I could stop this error? |
 |
|
|
|
|