Results 1 to 3 of 3

Thread: SQL statement

  1. #1
    Join Date
    Jun 2012

    Unanswered: SQL statement

    Hi I have a table where one column is an id card number (col1) and another is another column (col2). In col2 I have various values for each col1 ie col1 can have various values of col2. How can i insert col1 concatenated for each col1 in another table please?

    any help would be appreciated!

    Thank you

  2. #2
    Join Date
    Apr 2012

    I think you better post a sample data table and the corresponding rows you want to insert in another table.

  3. #3
    Join Date
    Sep 2006
    Surrey, UK
    Provided Answers: 2
    Air code, but I think this is what you need:
    INSERT INTO tblAllValues(Col3)
    SELECT Col1 + '~' + Col2 --Or any other separator here, if required
    FROM tblSplitValues
    Play about with the SELECT statement until you get what you need, remembering to add your actual table names.
    10% of magic is knowing something that no-one else does. The rest is misdirection.

Posting Permissions

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