Two Questions Revolving around bulk changes to data in tables
I have a schema that look like this
Name : Text
Table 2 Key:
I want to insert new rows into table 2 where temp =1 in table 1. I have a form set up where users can select all of the rows they want and then hit a button. At that time I would like to create all of the rows in table 2.
My two questions are:
1) Is there a simple way to set the value of SelectTemp of all rows of table 1 to 0. I tried using ExecSql and I don't seem to be doing it correctly.
2) Same thing for inserting the rows. I assume that there is a way to itterate over the table and do the inserts, but I can't seem to get it right.
If there is some sample code in some database I could be pointed to, I could probably work it out from there.