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]
 
Back
Top