Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert IIF To CASE
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01446575
Message ID:
01446577
Vues:
34
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform