? about Update query

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

Guest

I have a file that contains qualifiers in both populated and null fields.
Null field ex. Mail_Address1 = "", Field with value ex. Mail_Address1 = "123
Main St.".

I want to update fields with null values with another field in the table.
Issue is: Access does not seem to recognize "" as a null value. So when I
enter the criteria "" and enter the update to be xyz field a message box pops
up saying 0 records were updated. Is there a way using asc or some other
method that would help me to help access recognize "" as a null value so I
can update my table with another field in the table?

Thank you,

Dave
 
David said:
I have a file that contains qualifiers in both populated and null fields.
Null field ex. Mail_Address1 = "", Field with value ex. Mail_Address1 = "123
Main St.".

I want to update fields with null values with another field in the table.
Issue is: Access does not seem to recognize "" as a null value. So when I
enter the criteria "" and enter the update to be xyz field a message box pops
up saying 0 records were updated. Is there a way using asc or some other
method that would help me to help access recognize "" as a null value so I
can update my table with another field in the table?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The empty string ("") is NOT a NULL value, it is a zero-length string.

Two queries you might try:

UPDATE table_name
SET col1 = xyz_column
WHERE col1 IS NULL

or

UPDATE table_name
SET col1 = xyz_column
WHERE col1 = ""

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQbjk+YechKqOuFEgEQJiSgCg59ujoexjWYzgj+sOXsslXUkrajQAnR0B
wB1w20bIMHtwRmVKzQJpUFM9
=67fd
-----END PGP SIGNATURE-----
 
Back
Top