David,
If I try to reproduce your behavior in Query Analyzer, I get this
error message:
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'C:'.
If I add quotes around the file specification, I get this error message:
Server: Msg 4860, Level 16, State 1, Line 1
Could not bulk insert. File 'C:\doesnotexist.txt' does not exist.
It will help if you can post the exact statement that is giving you
trouble. Are you trying to run this command from somewhere
other than Query Analyzer. From where? If you are getting this behavior
from Query Analyzer, can you provide more information? Are the
tools and server on the same machine? Can you provide a repro
that can be cut and pasted into Query Analyzer that creates table1,
inserts data, and include this in your repro as well?
-- create table here
GO -- do not remove the GO separators
SELECT * FROM table1
GO
exec master..xp_cmdshell 'dir C:\test.txt'
GO
-- put BULK INSERT statement here
and cut and paste the output and messages you get from that
repro? (Send results to text so everything is together.)
Steve Kass
Drew University
[quoted text, click to view] David Mohandas wrote:
>I am trying to run a simple bulk insert command it says it has completed
>successfully, but no data gets inserted. Even if i give a bad filename,
>which does not exist it still says command completed successfully. If i run
>the same command on a different machine with a different instance of SQL
>server it works fine. The command i am trying to run is
>
>BULK INSERT table1 FROM C:\test.txt
>
>Anybody has any ideas?
>
>Thanks,
>David
>
>
>