Regarding FindString()

  • Hi,

    Anyone know how to seperate tab delimited data using FindString() Function. I got the data from flat file and in conditional split i want to split the tab delimited data into one file.

    Please help me on this issue.

    Thanks,

    Jags

  • Why don't you split it on the way in? I'm no SSIS wizard, but I believe they have a BULK task of some sort to load and split files on the way in.

    --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)

  • Hi,

    Here actually i am getting the data from script and by using conditional split i want to verify the excact data with tab delimited and save those data into seperate file. If any data not having tab delimited then save those data into another file.

    So can you suggest me how can i do this.

    Thanks,

    Jags

  • Hi,

    Like this i am verifying the pipe delimited data using findstring function.

    FINDSTRING(AllRowColumns,"|",9) != 0

    I want to verify this using tab delimited instead of pipe. What should i do here in that function.

    Thanks,

    Jags

  • I'm not sure what it is in SSIS but, in T-SQL, CHAR(9) is the tab character. In some places, it may be just \t or "\t".

    --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)

  • Hi Jeff,

    Yes Char(9) is used for tab delimited in script but here it is not working and /t also not working.

    I think i need to do more search on this.

    Thanks,

    Jags

  • Sorry Jags... I just don't know that much about SSIS. Hopefully, someone will see this and lend a hand.

    As a sidebar, I typically do this type of stuff in T-SQL using BULK INSERT and other tools.

    --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)

  • jagadeeshb (12/10/2009)


    Hi,

    Here actually i am getting the data from script and by using conditional split i want to verify the excact data with tab delimited and save those data into seperate file. If any data not having tab delimited then save those data into another file.

    So can you suggest me how can i do this.

    Thanks,

    Jags

    [font="Comic Sans MS"]

    You can use native SSIS capability to do this very easily. Use a flat file source system to point to your source file. While defining the connection manager - column tab - mention that the column delimeter is tab{t} from drop-down.

    If you have a fairly correct formatted source file - you should be able to see the preview.

    Now right click on the flatfile source component - to go to advance editor - go to 'Input & Output properties' and configure flatfile source error output...

    You can redirect 'bad' rows to the output and good rows to another output.

    See the following for more help:

    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=101225

    (this should resolve your requirement)

    Fore more :

    http://www.bimonkey.com/2009/06/flat-file-source-error-the-column-delimiter-for-column-columnname-was-not-found/

    http://www.sqlservercentral.com/Forums/Topic666292-148-1.aspx

    Let me know how it goes..

    [/font]

    [font="Comic Sans MS"]--
    Sabya[/font]

  • --Removed

    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

  • My 2c...

    Was having the same problem and found that:

    FINDSTRING([Input],"\t",1)

    ...worked just fine

Viewing 10 posts - 1 through 9 (of 9 total)

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