Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Trying to load data from specific fields in a text file

$
0
0

I'm trying to run this.

INSERT INTO  [London].[dbo].[SPGT]   
([INDEX NAME])
SELECT ([INDEX NAME])
FROM 'C:\Documents and Settings\london-sql\Desktop\SPGT.TXT';

I really want all fields, except for the first, but I thought I'd try it with just one field name, to keep it simple, and it doesn't work.

I keep getting this error.

Msg 102, Level 15, State 1, Line 4
Incorrect syntax near 'C:\Documents and Settings\london-sql\Desktop\SPGT.TXT'.

I don't know what's wrong with that path.  That's exactly what it is.


Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>