PDA

View Full Version : Replace one field with another



austenr
09-25-2006, 05:46 PM
I am writing a query in SQL view where if two fileds are = 0 then i want to replace the values with two other fields. So for example if field 1 and field 2 are = 0 then field 1 = field 3 value and field 2 = field 4 value.

Have tried writing it a few ways but it never seems to work. Can anyone provide some direction? Thanks :banghead:

OBP
09-26-2006, 04:19 AM
If you do it in query view instead of SQL view set the 2 columns Criteria to 0
so it only selects records where both are zero.
Change the query to an Update query and set the "Update to what" fields to
[field 3] and [field 4] respectively.
If this works you can then look at the SQL view to see what the SQL looks like.