Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2011
    Posts
    2

    Unanswered: Parsing Multiple Names

    Hi

    I have a column where the fullname is firstname,lastname format. This column also contains multiple names in firstname,lastname format that are separated by ;. so the example is "John Doe; Jane Doe" etc. I need to create a trigger on the table so that all the new entries from the existing table can be inserted into another table. My trigger works as long as there is no semicolon in it. However I am not sure how to parse two name and then insert them as two rows in firstname, lastname columns in the other table. Any help is greatly appreciated.

    DRL20

  2. #2
    Join Date
    Nov 2004
    Posts
    1,427
    Provided Answers: 4
    What event would trigger the trigger? an INSERT, an UPDATE, a DELETE ?
    With kind regards . . . . . SQL Server 2000/2005/2012
    Wim

    Grabel's Law: 2 is not equal to 3 -- not even for very large values of 2.
    Pat Phelan's Law: 2 very definitely CAN equal 3 -- in at least two programming languages

  3. #3
    Join Date
    Oct 2011
    Posts
    2
    The event would be insert and update.

    Thanks
    DRL20

  4. #4
    Join Date
    Nov 2004
    Posts
    1,427
    Provided Answers: 4
    Can you post the code of the trigger you have so far?
    With kind regards . . . . . SQL Server 2000/2005/2012
    Wim

    Grabel's Law: 2 is not equal to 3 -- not even for very large values of 2.
    Pat Phelan's Law: 2 very definitely CAN equal 3 -- in at least two programming languages

Posting Permissions

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