Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Apr 2001
    Location
    Joliette, Quebec, Canada
    Posts
    290
    Thanks
    9
    Thanked 0 Times in 0 Posts

    iif with a like : data mining problem (2000 SP3)

    I have a text field that has characters and numbers, a value of 3 indicates high risk, a sample text could be "noise (3), solvents (2)", I want to create an new risk variable that would attribute a "high risk" to the risk variable if a "3" is present in the text, otherwise a value of medium risk should be attributed.

    Iif (text variable = like *3*, "high risk"; "medium risk ") <img src=/S/crossfingers.gif border=0 alt=crossfingers width=17 height=16>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: iif with a like : data mining problem (2000 SP3)

    You must enclose all literal string values in quotes, and enclose field names in square brackets:
    <code>
    IIf([Text Field] Like "*3*","high risk","medium risk")</code>

  3. #3
    3 Star Lounger
    Join Date
    Apr 2001
    Location
    Joliette, Quebec, Canada
    Posts
    290
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Re: iif with a like : data mining problem (2000 SP3)

    I am embarassed <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

Posting Permissions

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