UPDATE or Union Querry

  • Thread starter Thread starter Tom Rector
  • Start date Start date
T

Tom Rector

WIN XP HOME, OFFICE XP 2002 ACCESS 2002

Thanks in advance for bailing me out again,,

I guess I have forgotten and cannot find a forum question that matches
my situation. I have a single record in a table that has a yes/no
field (yfield) I want to set it "yes" (-1) based on, if a field
(provider) in the same record has a blank value:

Such that yfield=-1 if "provider" = " "

I have tried select and update queries with UNION and cannot figure
out how to make it work.

There are 10,000+ records (lines) in the table.

Thanks again...
 
UPDATE MyTable
SET yfield = True
WHERE provider = " "

But are you sure that provider has a blank in it? It's very common for
fields to have a null string (""), or Null when there's no value. If that's
the case, try:

UPDATE MyTable
SET yfield = True
WHERE Len(Trim([provider] & "")) = 0
 
Back
Top