I have a set of data that I need to clone from three cascading tables
tblSurvey has SurveyID, SurveyName (UID is SurveyID)
tblQuestions has QuestionID, QuestionText, SurveyID (UID is QuestionID)
tblAnswers has AnswerID, AnswerText,QuestionID (UID is AnswerID)
I insert into tblSurvey (Select SurveyName from tblSurvey where SurveyID = @OldSurveyID)
I insert into tblQuestions (Select QuestionText,@NewSurveyID from tblQuestions where SurveyID = @OldSurveyID)
My problem is matching inserting the AnswerText and matching to the new set of QuestionID's