Why do you say it did not work? Were both fields not updated?
Also, I thought you were just giving us a generic question, so I gave you
a generic response. At a minimum I should have added brackets around the
source field name in the line SET ColumnA = ColumnB
UPDATE YourTable
SET ColumnA = [ColumnB] ,
ColumnB = Null
WHERE ColumnA is Null and ColumnB is Not Null
Please copy and post the SQL of your actual query.
(Possibly unneeded instructions follow)
Open the query
Select View:Sql from the Menu
Select all the text
Copy it
Paste it into the message
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
.
Bikini Browser said:
I tried it. It did not work. 233 rows were changed but I don't know
what those chanages were. Most of the data is still the same.
No error messages.
Hmmm...
Dale
Have you tried?
UPDATE YourTable
SET ColumnA = ColumnB,
ColumnB = Null
WHERE ColumnA is Null and ColumnB is Not Null
Test this on a copy of your data and see if it gives you the expected
results. Or BACK UP your data first and then try it.
'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
Bikini Browser wrote:
Hello...
I need a query written that will do the following...
If column A is NULL and Column B is NOT Null, Then move (not copy)
column B to Column A.
Any takers? How do you write that?
Dale