Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem With WHERE Clause
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01446031
Message ID:
01446194
Vues:
19
>>Ok, killing the programmer aside, I'm still stuck on this. I have verified the problem lies with the conversion of the IIF to CASE. I'm off by 4 rows.
>
>Try:
>
>WHERE PK_MOC.MOC_PART_NO) NOT LIKE '%-CR'  AND
>      PK_MOC.MOC_PART_NO  NOT LIKE '%RMA%' AND
>      PK_MOC.MOC_PART_NO  NOT LIKE '%RW'   AND
>      PK_MOC.MOC_PART_NO  NOT LIKE '%RWK'  AND
>      PK_MOC.MOC_OHNUMBER NOT LIKE 'FCST%' AND
>      1 = CASE WHEN (PK_RQ.RQ_STATUS='C' OR  PK_RQ.RQ_QTY_ISS>=PK_RQ.RQ_QTY_REQ) AND
>                    (PK_RQ.RQ_DATE_PROM>=Date()-365 OR PK_RQ.RQ_DATE_REQ>=Date()-365)
>                    THEN 1
>	       WHEN (PK_RQ.RQ_STATUS='C' OR PK_RQ.RQ_QTY_ISS>=PK_RQ.RQ_QTY_REQ)
>	            THEN 0
>	  ELSE 1 END                       AND
>      PK_OH.OH_STATUS <= 3                 AND 
>      PK_MOC.MOC_OHTYPE <> 'Q'             AND
>      (PK_RQ.RQ_O_TYPE   <> 'X' OR PK_RQ.RQ_O_TYPE IS NULL)
>
I get the same results as I did using my interpretation of it.
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform