|
-
How to check for a numeric value in a column
Hello All,
Can someone pls help me with how to check for a numeric value in a varchar column?
For example I have a column called client_id , it has values "AB" , "CD" , "18", "19" . I need to delete those client_id where the values are 18 and 19. How would I do that?
Thanks in advance!!
-
create table mytable1 (name varchar(2))
insert into mytable1 select 'AB'
insert into mytable1 select 'CD'
insert into mytable1 select 'EF'
insert into mytable1 select '18'
insert into mytable1 select '19'
delete from mytable1 where isnumeric(name)=1
-
if you have values like '1233E23' that is considered to be numeric cas' E stands for exponential.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|