AnsweredAssumed Answered

Two Questions Revolving around bulk changes to data in tables

Question asked by MrMLK on Jun 3, 2013
Latest reply on Jun 6, 2013 by philmodjunk

Title

Two Questions Revolving around bulk changes to data in tables

Post

     I have a schema that look like this

      

     Table 1:

     Name : Text

     SelectTemp: Number

      

     Table 2:

     Table 2 Key:

     Name: Text

      

     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.

     Thanks.

Outcomes