Monday, March 26, 2012

Read Text file

Hi,

I have the text file in my server.

Is it possible to read that text file and insert into the table.

pls advice

Regards

Antony

SELECT PVListFile.F1 AS mytxt INTO MyTable FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0','Data Source="c:\";User
ID="Admin";Password=;Extended Properties="text;HDR=No"')...filename#txt as PVListFile
|||

Refer to Books Online about using 'BULKINSERT', 'bcp', and/or 'OPENDATASOURCE'.

See this recent thread about using bcp.

sql

No comments:

Post a Comment