Question whit bulk copy

  • i have a bulk copy sentence

    BULK INSERT Temporal FROM C:\Archivo.DAT

    this file have a colection of codes like this:

    10340

    10341

    10342

    10343

    10345

    10346

    10347

    10348

    10349

    10350

    10351

    and i have a format file for those codes

    The question is:

    Why the archive that have the codes have to be in extension .DAT?? mi files are .txt

    thank you any help to this

  • EIAnd (1/19/2009)


    BULK INSERT Temporal FROM C:\Archivo.DAT

    ...

    The question is:

    Why the archive that have the codes have to be in extension .DAT?? mi files are .txt

    No reason that I know of. Try it like this:

    BULK INSERT Temporal FROM C:\Archivo.TXT

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • I believe the file name needs to be in quotes, folks.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply