RE: SQL statement Update THEN ADD (From the ASP Q & A Forum)<BR>Are you sure you want to add COLUMNS to a table when updating a record ??? Maybe you mean that you want to add ROWS to another table. In any case you could use an update trigger on tblSubscriberRequirements or you could simply create another recordset which updates the other table(s) when fTotalHours >= rs("HoursRequired").
if you have sql server then you can write a trigger. The easiest way to do it in my opinion is through the sql manager. Right click the table and choose all tasks/manage triggers. A trigger is almost exactly like a stored procedure except it can have up to 3 events on a table that causes it to excecute.. insert/update/delete. In here on this website there is a tutorial on how to write stored procedures i dont have the link off hand but the search function will find it. If you dont have sql manager to tinker with Then you will need to write the trigger code itself. I have an sql manager here.. hold on.. here we go..<BR><BR>CREATE TRIGGER [TRIGGER NAME] ON [Table_name] <BR>FOR INSERT, UPDATE, DELETE 'you dont have to use all 3<BR>AS<BR>UPDATE WHATEVER SET SOMEFIELD=' 3'<BR><BR>Use the ado command object or something to run it once. Then the trigger should be there for good. I havent actually tried it through ado though. Should work. Try to find some good text on this stuff you can write if statements to compare values of rows that have been inserted/updated. Its a very useful tool. There is a built in table called inserted that contains all the rows and values that were inserted to the table. Which is pretty handy also.