So here are the basics of my question. I have selected a result set from the join of two tables. This result set is a series of id values and email addresses. Now for each row in this result set, I want to insert a new row into a third table called timestamps that has a timestamp from NOW() and the id value from the result set, but not the email address. I know I can achieve this by running a loop within a stored procedure. Additionally I think I cannot simply run an insert into statement because the data I am inserting into timestamps does not come from my result set in its entirety, my result set data only decides the number of rows that must be inserted and the ids, while I need to return those email addresses for other processing. I am searching for a clever way to avoid using a loop for this. Is that possible? Can I generate a dynamic insert statement? Thank you to anyone who gives time or help.
-
Please give example of your tables. please specify with examples what are your exact requirements.Krishna Rani Sahoo– Krishna Rani Sahoo2013-07-22 09:04:32 +00:00Commented Jul 22, 2013 at 9:04
-
@krishnasahoo Oh wow. I do not remember. I will review my notes and question and try to reconstruct what I was up to back then, but this is still an unsolved issue, so thank you for your time.usumoio– usumoio2013-07-22 12:25:45 +00:00Commented Jul 22, 2013 at 12:25
Add a comment
|