Update Query

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
 
B

Brendan Reynolds

Here's an example ...

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top