Converting a query to SQL

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

Guest

Hi,
I have the following quesy in my Access DB:

UPDATE tbl_Agenda SET tbl_Agenda.MS_Status_Icon_Code =
IIf([TASK_ACT_FINISH]>1,1,IIf([TASK_FINISH_DATE]<=[TASK_BASE_FINISH],2,IIf([TASK_FINISH_DATE]<=[TASK_BASE_FINISH]+14,3,IIf([TASK_FINISH_DATE]>[TASK_BASE_FINISH]+14,4,2))));

For some reason, I couldn't use this query in a similar *SQL* DB. Do I have
a syntax error?
Thanks,
Yoav
 
Is the function IIF() supported by the other SQL DB? My guess is that it
probably isn't but maybe it has a function IF().
Hi,
I have the following quesy in my Access DB:

UPDATE tbl_Agenda SET tbl_Agenda.MS_Status_Icon_Code =
IIf([TASK_ACT_FINISH]>1,1,IIf([TASK_FINISH_DATE]<=[TASK_BASE_FINISH],2,IIf([TASK_FINISH_DATE]<=[TASK_BASE_FINISH]+14,3,IIf([TASK_FINISH_DATE]>[TASK_BASE_FINISH]+14,4,2))));

For some reason, I couldn't use this query in a similar *SQL* DB. Do I have
a syntax error?
Thanks,
Yoav
 
Unfortunately It doesn't work...
any other ideas?

kingston via AccessMonster.com said:
Is the function IIF() supported by the other SQL DB? My guess is that it
probably isn't but maybe it has a function IF().
Hi,
I have the following quesy in my Access DB:

UPDATE tbl_Agenda SET tbl_Agenda.MS_Status_Icon_Code =
IIf([TASK_ACT_FINISH]>1,1,IIf([TASK_FINISH_DATE]<=[TASK_BASE_FINISH],2,IIf([TASK_FINISH_DATE]<=[TASK_BASE_FINISH]+14,3,IIf([TASK_FINISH_DATE]>[TASK_BASE_FINISH]+14,4,2))));

For some reason, I couldn't use this query in a similar *SQL* DB. Do I have
a syntax error?
Thanks,
Yoav
 
What functions are available in the other SQL DB? I would be surprised if
there wasn't something that works like IIF() in Access.
Unfortunately It doesn't work...
any other ideas?
Is the function IIF() supported by the other SQL DB? My guess is that it
probably isn't but maybe it has a function IF().
[quoted text clipped - 9 lines]
 

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

Back
Top