query to display where a column contains alphanumeric data and i want to retrieve both string and numeric data separately into two columns
as
column
...................
abc
efg
123
456
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vikram AgrawalPosted Dec 9, 2014, 6:08 AM
Modify this as per your requirement
Thanks.
Mark This Answer is correct if it is helpful to you
priya AvanigaddaPosted Dec 9, 2014, 2:23 AM
Vikram AgrawalPosted Dec 9, 2014, 2:17 AM
Column
abc123
254pqr
mmmm
1234
so do you want to seprate these values in two columns like:
Column 1 Column 2
abc 123
pqr 254
mmmm NULL
NULL 1234
priya AvanigaddaPosted Dec 9, 2014, 2:12 AM
Kunal VaishyaPosted Dec 9, 2014, 2:04 AM
SELECT columnName FROM table where ISNUMERIC(columnName) = 1
use this ISNUMERIC for filtering data.
Manish Kumar ChoudharyPosted Dec 8, 2014, 11:01 PM
For numeric row
select * from where not like '%[^0-9]%'
For alphanumeric row
select * from where like '%[^0-9]%'