Conditional update field in sql

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to update a field conditionally in sql. For example: if file.error =
"A" set file.description = "Error A" else set file.description = "Unknown".
Is there a way to do this with one sql statement?
 
Stukmeister said:
I need to update a field conditionally in sql. For example: if file.error =
"A" set file.description = "Error A" else set file.description = "Unknown".
Is there a way to do this with one sql statement?

SET file.description = Iif(file.error="A","Error A","Unknown")
 
Back
Top