select

  • I want to get all records that are not numbers or number not greater than 10 digits length, am i doing right?

    update Employee

    set ecode = NULL

    from Employee where len(ecode ) <> 10 or isnumeric(ecode)=0

  • pls. go through BOL or get a good book on SQL Server... as u r doing update..... and ur requirement is to get the records....

  • Try this:

    --update table

    --set ecode = NULL

    select * from table

    where

    patindex('%[^0-9]%', @STR) > 0

    or

    ecode > 999999999

  • Try this:

    --update table

    --set ecode = NULL

    select * from table

    where

    patindex('%[^0-9]%', ecode) > 0

    or

    ecode > 999999999

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

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