This topic is locked

Update record in another table

10/17/2007 3:23:21 PM
ASPRunnerPro General questions
T
teri.pratt@verizon.net author

When a user changes their Email address in one table I need to update it in another table. I tried using the Before Record Add INSERT but keep getting errors that say I may have a reserved word use problem. I verified all my fieldnames are valid. Is an INSERT the right method, or should I use an UPDATE statement instead?

Sergey Kornilov admin 10/17/2007

To update an existing record you need to use UPDATE statement.

More info: http://www.webcheatsheet.com/sql/interacti.../sql_update.php

P
Philip 10/18/2007

Hi

can someone publish a working example for this (in reality the update is based on fields and keys and not terms as "where field_A is 'Smith' "

Thanks

Sergey Kornilov admin 10/18/2007

Instead of hardcoded values like 'Smith' use dict("FieldName") and/or keys("KeyColumnName").