Multiple Child Records ???

Results 1 to 2 of 2

Thread: Multiple Child Records ???

  1. #1
    Chris T Guest

    Default Multiple Child Records ???

    What I really want to do is take the string "apples,oranges,bananas......" and create a record for each one of these in a two field table using my stored proc. <BR><BR>The first field of the table gets its value from the @@IDENTITY <BR><BR>so from "apples,pears,oranges......." <BR><BR>i want in my table <BR><BR>ID Content <BR>34 apples <BR>34 pears <BR>34 oranges <BR><BR>Etc. Any Ideas anyone???? Maybe more of a DB Stored Proc Question but im sure someone will know. <BR><BR>Cut down version of StoredProc &#062;&#062; <BR><BR>CREATE PROCEDURE spAddCourse <BR><BR>SET @CourseID = @@IDENTITY <BR><BR>--insert into year1 Table <BR>--this is where I want multiple records inserted from a delimited string <BR><BR>INSERT INTO Year1 (CourseID, Content) <BR><BR>VALUES (@CourseID, @year1content) <BR><BR>Return

  2. #2
    Join Date
    Dec 1969

    Default Here's an example up your alley...<BR><BR>Let me know if it helps you out.

Posting Permissions

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