Query for Insert (Based on comma)

  • Based on Comma Separated

    1) It had total one string means In one string more than one owner,father name(may be or may not be) , rationcardno(may be or may not be) comes

    2) In a string First Ownername(Aakula Anjaiah) second one is father name(S/o Veeraiah) and third one is RationCardno(Wap 6825011205) and again follows owner name/father name/rationcardno

    Table:Temp

    SID OwnerName/FatherName/RationCardnO

    S001 Aakula Anjaiah S/o Veeraiah Wap 6825011205, Aakula

    Sada Nandam S/o Veeraiah, Aakula Veeraiah

    S002 Sayad Ajimuddin S/o Bhasumiya Wap 6825010014, Shaik

    Shassina Begam W/o Moulana Wap 1883913037,

    Syed Alina W/o Bhasu Wap 883910321, Syed Nabhi

    S/o Bhasu,Syed Mahaboob Ali S/o Bhasu Wap 3839130147,

    Syed Ali S/o Bhasumiya

    I had Temp Table with one column as OwnerName/FatherName/RationCardnO

    I want to insert above values into 4 fields of Temp1 table

    my Temp1 table as 4 columns

    SID

    OwnerName

    FatherName

    RationCardNo

    Plz give me a query to insert

    ***The separtaion must be Comma

  • you started a second thread on the same issue.. a lot of posters asked for clarification, and you never replied.

    we really need an explanation of the format of the string.

    you say comma delimited, but it's not. one string has 3 elements, another has more.

    lets continue where we left off, and provided the needed information

    follow the thread here:

    http://www.sqlservercentral.com/Forums/FindPost703087.aspx

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

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

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