Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2004
    Posts
    25

    Unhappy Unanswered: Load data from comma delimited text file

    Hello, i need to load some data from a long comma delimited text file, How can a i do that, using t-sql?, thanks for your help!!!!!

  2. #2
    Join Date
    Sep 2003
    Posts
    522
    what do you mean "long"? is there a row delimiter in the file?

  3. #3
    Join Date
    Feb 2004
    Posts
    25

    Arrow

    the file has 25.000 ++ rows, and yes, is comma delimited!

  4. #4
    Join Date
    Feb 2004
    Location
    San Antonio, TX
    Posts
    565
    click the start button on your desktop and then click run
    in the run dialog box type dtswiz

    when the import export wizard opens up perform the following tasks..


    set the source as your text file

    set the destination as your table

    set any transformations

    save this as you need to ( i always save to a com storage file)

    schedule if you need to

    click finish...

  5. #5
    Join Date
    Nov 2003
    Location
    FRANCE
    Posts
    393
    Bulk Insert yourtable
    From 'c:\yourtextfile.txt'
    With (FieldTerminator = ',',
    RowTerminator = ',\n',
    CodePage = 'ACP',
    TabLock);

  6. #6
    Join Date
    Feb 2004
    Posts
    25

    Thumbs up Thanks for your suggestion

    The bulk insert is that i was looking for. Thanks for your help!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •