Moving Data

T

Todd

I'm trying to write a query which moves data to a different field, i'm going
to use this to update a db2 database
currently our users have the option of adding the suburb into 2 fields
either addr4 or suburb
i want to move all data from addr4 field into suburb field if suburb field
is null, then make addr4 null.
working on the below theory
if suburb is null then
suburb = addr4
addr4 is null

Not sure how to do this in access
I only need a select query for this as the results will be outputted onto
our server
 
J

JohnFol

You'll need the following in the Suburb field

=IIF( isnull( [suburb] ), [Addr4] , [suburb])
 
J

John Spencer (MVP)

You could use an IIF or NZ function. In the query grid:

Field: NewSuburb: NZ(Suburb,Addr4)

and

Field: NewAddr4: IIF(Suburb is Null, Null, Addr4)
 

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