Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best way to code this update query?

Status
Not open for further replies.

ZABADAK

Programmer
Feb 24, 2005
39
US
I am importing some data into my access database (access 2000). The data contains about 50 columns with a status and a date, this represents status history. There is also a column for 'current status and a date'. What I need to do is to move this current status and date into the correct column in the most efficient way possible. So far I have "UPDATE tblImport..... WHERE NZ(Current_Status) <> 0;".
Now how do I test the current_status field and perform the correct column updates? Can I use a CASE statement? I do know that certain statuses are much more common that others so a way of doing the tests that takes advantage of this would be good.
 
Take a look at the IIf function.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top