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

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » iif with a like : data mining problem (2000 SP3)

    • This topic has 2 replies, 2 voices, and was last updated 19 years ago.
    Author
    Topic
    #432397

    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 “) crossfingers

    Viewing 0 reply threads
    Author
    Replies
    • #1014270

      You must enclose all literal string values in quotes, and enclose field names in square brackets:

      IIf([Text Field] Like "*3*","high risk","medium risk")

    Viewing 0 reply threads
    Reply To: iif with a like : data mining problem (2000 SP3)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: