Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2012
    Posts
    15

    Unanswered: using IIF with And and Or

    Hello

    I searched a lot and I couldn't find what I am looking for

    I am trying to combine IIF function with And and Or and I started my first query but it doesn't work and I can't figure out why

    if you can please help me or provide some links to help with having many conditions in iif

    I am still new and only use the code builder no idea on SQL


    Case1: IIf(([CountOfORDER_NUMBER]=1) And (([CPU_TYPE]="*sae*") Or ([CPU_TYPE]="*preliminary*")) And (([WO_STATUS]="dlp" or [WO_STATUS]="fc")),"N","")


    Thanks very much



    Additional info :

    What I want to is

    if [CountOfORDER_NUMBER]=1
    And [CPU_TYPE]="*sae*" OR = "*Pre*"
    And [WO_STATUS]="dlp" or "fc"

    I just get any indicator otherwise I don't care

    but that's the first and easiest case

  2. #2
    Join Date
    Jan 2012
    Posts
    15
    guys I found the answer

    I didn't add "Like"

    Case1: IIf(([CountOfORDER_NUMBER]=1) And (([CPU_TYPE] Like "*sae*") Or ([CPU_TYPE] Like "*pre*")) And (([WO_STATUS]="dlp" Or [WO_STATUS]="fc")),"N","")

    Thanks very much

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •