USING textcopy to import data from file into table | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

USING textcopy to import data from file into table

Hi, I am having problems importing XML string into my table. 1, When I use
BULK INSERT Northwind.dbo.xml_test
FROM ‘c:myfile.xml’
WITH
(
FIELDTERMINATOR = ‘|’,
ROWTERMINATOR = ‘|

) I get an error:
Bulk Insert: Unexpected end-of-file (EOF) encountered in data file. 2, Tried to do the bcp with format file, no luck. 3. the textcopy sort of works, but truncates the string, so only part of it is imported. I use it so:
TEXTCOPY /SmyServer /Usa /Psapass /DNorthwind /Txml_test
/CtxtDocument /I /Fmyfile1.txt /W"WHERE iKey = 1"
can someone helP?
http://www.perfectxml.com/articles/xml/importxmlsql.asp
http://support.microsoft.com/?scid=316005 FAyi. Satya SKJ
Contributing Editor & Forums Moderator
http://www.SQL-Server-Performance.Com
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
Thanks, I saw these before. I was hoping to avoid the schema creation, and do this as simple as possible through the Bulk load. Thanks anyhow for the help
]]>