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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Dec 8, 2014, 6:01 PM EST
For numeric row
select * from where not like '%[^0-9]%'
For alphanumeric row
select * from where like '%[^0-9]%'
Kunal VaishyaRank #990 · 2K reputationPosted Dec 8, 2014, 9:04 PM EST
SELECT columnName FROM table where ISNUMERIC(columnName) = 1
use this ISNUMERIC for filtering data.
priya AvanigaddaRank #7,836 · 233 reputationPosted Dec 8, 2014, 9:12 PM EST
Vikram AgrawalRank #4,713 · 329 reputationPosted Dec 8, 2014, 9:17 PM EST
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 AvanigaddaRank #7,836 · 233 reputationPosted Dec 8, 2014, 9:23 PM EST
Vikram AgrawalRank #4,713 · 329 reputationPosted Dec 9, 2014, 1:08 AM EST
Modify this as per your requirement
Thanks.
Mark This Answer is correct if it is helpful to you