PDA

View Full Version : Modifying ALL NULL Values



asingh
03-22-2006, 04:22 PM
Hi,
I have a table with around 20 columns.[The table has been ported to access with column headers]. Some of the values in the table are blank. What query should I use in access that will search all my values and replace the NULL values with a '-'.

For example my table name is: MyTableforData and
my columns in this table would be......ColumnA,ColumnB,ColumnC....so on.

thanks a lot for the help,

asingh

JMG
03-23-2006, 08:38 AM
nz([columna],"-")

matthewspatrick
03-23-2006, 10:43 AM
A little more verbose:

UPDATE MyTableforData
SET ColumnA = Nz([ColumnA, "-"), Columnb = Nz([ColumnB, "-"), ColumnC = Nz([ColumnC, "-"), ...

asingh
03-24-2006, 04:27 PM
JMG & MatthewsPatrick,
Thanks a lot...it worked perfect............! All NULL values are being UPDATED to "-".


regards

ASingh