• raguyazhin (2/13/2013)


    Hi

    Thanks to all, This issue rectified by using PATINDEX(%[0-9]%) in Where clause.

    --Ragu Thangavel

    Ragu,

    I'm trying to understand how you used PATINDEX() to test strings for all digits. What you posted:

    PATINDEX(%[0-9]%)

    . . . is syntactically incomplete as PATINDEX() requires two parameters and the pattern has to resolve to a string.

    Even after changing it to something that will run, it seems that your wild-card pattern will merely check that there is at least one digit 0-9 in the expression/column to be tested, and not that it is ALL digits.

    So, how does your WHERE clause use PATINDEX() to validate a column?

    ---

    edit: minor typo: "use", not "us" in last question.