Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)

  • RE: Bulk Insert Grief

    Glad to help.

  • RE: Bulk Insert Grief

    Jim,

    Problem solved... 🙂

    The format file is in Unicode format. It needs to be saved a plain ASCII Text file.

    I was able to duplicate the issue with your original...

  • RE: Bulk Insert Grief

    Jim,

    A good hex editor to use is Ultra-edit. I have used it extensively when dealing with flatfiles. Avoid Notepad, it will handle CR, CR\LF, and LF all the same...

  • RE: Bulk Insert Grief

    Jim,

    So my code worked for you? If so, just substitute your files in place of mine and see what happens.

    Also, may be completely unrelated, but I have had...

  • RE: Bulk Insert Grief

    Jim,

    They were backslash-r, backslash-n in the format file and the bulk insert.

    Todd

  • RE: Bulk Insert Grief

    Jim,

    I was able to get the following code to run ok. I am running SQL 2005 SP2.

    drop table ##c

    go

    create table ##C (

    [FLD1] varchar(5)

    ,[FLD2] varchar(6)

    ,[FLD3] varchar(7)

    )

    go

    bulk insert ##C

    from 'C:\Users\tedwards\documents\data.txt'...

  • RE: Bulk Insert Grief

    Jim,

    Two things, I think the format file you have is not right. You have

    9.0

    1

    1 SQLCHAR 0 2016 1 "\r" [JUNK] ""

    Should be

    9.0

    1

    1 SQLCHAR 0 2016 "\r" 1...

Viewing 7 posts - 1 through 7 (of 7 total)