Update Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am importing data from an Excel sheet into a Temp table before I update my
main table. The trouble is that some fields in the Temp table result in a
zero length string and I want to run a query to update all fields that
contain zls ("") within the table to "null"
I can do this field by field but I'm getting confused how to run a single
query to do the whle table at once.
Can anyone help?
Thanks in anticipation
 
Here's an example ...

UPDATE YourTable SET YourField1 = IIf(YourField1 = "", Null, YourField1),
YourField2 = IIf(YourField2 = "", Null, YourField2), YourField3 =
IIf(YourField3 = "", Null, YourField3)
 
Back
Top