Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert IIF To CASE
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01446575
Message ID:
01446577
Views:
35
>I cannot get this Access IIF to convert right. Could use some help.
>
>Here's the source
>
>IIf([PK_RQ]![RQ_STATUS]="C" Or [PK_RQ]![RQ_QTY_ISS]>=[PK_RQ]![RQ_QTY_REQ],IIf([PK_RQ]![RQ_DATE_PROM]>=Date()-
>365 Or [PK_RQ]![RQ_DATE_REQ]>=Date()-365,True,False),True)
>
>
>Here's what I have
>
>(CASE WHEN (RQ.RQ_STATUS = 'C' OR  RQ.RQ_QTY_ISS >= RQ.RQ_QTY_REQ) AND
>(RQ.RQ_DATE_PROM >= DATEADD(dd,0,GETDATE())-365 OR RQ.RQ_DATE_REQ >= DATEADD(dd,0,GETDATE())-365) THEN 1 END = 1) AND
>
It looks like that got chopped off.

Borislav answered a very similar question the other day, using CASE in a much more readable format. The formatting above practically defies you to follow it.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform