How do I import text file delimited with three Pipes |||

  • Hi All,

    I am having a hard time importing a text file that was given to me that is delimited by 3 pipes.

    I am manually importing by right clicking on my database and choosing Tasks...Import Data

    When I get to the Column Delimiter section I have tried the following with no luck

    {|||} and I have tried {|}{|}{|}

    Any help is greatly appreciated...

  • Remove the braces and just leave the pipes. Then click refresh.

    If it doesn't work, copy the delimiter from the file and paste it in the column delimiter field.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • How about selecting one pipe as your delimiter and then throwing away the empty columns?

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • 1. Create the table

    2. Use BCP and specify the field terminator as the "|||"

    A possible command, fill in the blanks to fit your environment

    BCP Database.Schema.Table IN C:\bcp\ImportThis.txt /m 100 /b 100 /e C:\bcp\ImportThis.err /c /r /f "|||" /S Server /T

    Michael L John
    If you assassinate a DBA, would you pull a trigger?
    To properly post on a forum:
    http://www.sqlservercentral.com/articles/61537/

  • brianconner (6/21/2016)


    Hi All,

    I am having a hard time importing a text file that was given to me that is delimited by 3 pipes.

    I am manually importing by right clicking on my database and choosing Tasks...Import Data

    When I get to the Column Delimiter section I have tried the following with no luck

    {|||} and I have tried {|}{|}{|}

    Any help is greatly appreciated...

    If you received an error message, can you post it, please?

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Thank you very much.....

Viewing 6 posts - 1 through 5 (of 5 total)

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