August 6, 2010 at 7:36 pm
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
August 7, 2010 at 3:29 am
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....
August 7, 2010 at 6:50 am
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