WHERE: to restrict records with "closed" text

  • I am looking for the syntax that allows me to run a stored procedure with a WHERE statement that will restrict records in a text field ONLY to the entries that include the word "CLOSED" I was wondering if there are Keywords such as:

    INSTR

    CONTAINING

    INCLUDING

    That could be used in order to do so.

    Thanks For your continued Help.


    Thanks For your continued Help.

  • The function you are looking for is PATINDEX, as in:

    WHERE PATINDEX('%Closed%', FieldToLookIn) > 0

    edit: sorry, forgot the wildcard characters...

    Edited by - jpipes on 03/05/2003 09:57:08 AM

  • Thank you that worked Just great!!

    Thanks For your continued Help.


    Thanks For your continued Help.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply