Script to separate note column (varchar)

  • Anyone have any tricks to separate this column from:

    "testlname,testfname comment section > comment section testlname,testfname 6/30/2015 9:05:58 AM > testlname,testfname 6/30/2015 9:06:18 AM > comment section testlname,testfname 6/30/2015 9:10:05 AM > comment section"

    to:

    col1 Col2 col3

    testlname,testfname 6/30/2015 9:05:58 AM comment section

    testlname,testfname 6/30/2015 9:06:18 AM comment section

    testlname,testfname 6/30/2015 9:10:05 AM comment section

    Thanks in advance

  • RRIOS42 (7/29/2015)


    Anyone have any tricks to separate this column from:

    "testlname,testfname comment section > comment section testlname,testfname 6/30/2015 9:05:58 AM > testlname,testfname 6/30/2015 9:06:18 AM > comment section testlname,testfname 6/30/2015 9:10:05 AM > comment section"

    to:

    col1 Col2 col3

    testlname,testfname 6/30/2015 9:05:58 AM comment section

    testlname,testfname 6/30/2015 9:06:18 AM comment section

    testlname,testfname 6/30/2015 9:10:05 AM comment section

    Thanks in advance

    Hi and welcome to the forums. It is nearly impossible from what you posted to decipher what is really going on. The best thing you could do is to post ddl (create table scripts) and sample data (insert statements).

    Please take a few minutes and read the first link in my signature for best practices when posting questions.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

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

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