SQL Server Performance

USING textcopy to import data from file into table

Discussion in 'T-SQL Performance Tuning for Developers' started by BikeBoy, Dec 11, 2005.

  1. BikeBoy New Member

    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?
  2. satya Moderator

  3. BikeBoy New Member

    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

Share This Page