May 4, 2013 at 11:51 am
hi friend i have small doubt in sql .plese tell me how to solve
table data contains like below
col
10
abc
jai
20
21
kali
23
ravi
28
kum
lan
balu
31
based on this table i want separte numbers and string values
output like
ColCol1Col2
1010
Abc.abc
Jai.jai
2020.
2121.
Kali.kali
2323.
Ravi.Ravi
2828.
Kum.Kum
Jan.Jan
Lan.Lan
balu.Balu
3131.
plese tell me how to wirte query to solve this issue in sql server.
May 4, 2013 at 12:03 pm
this article may help you
http://www.sqlservercentral.com/articles/IsNumeric/71512/
SELECT col,
case when col NOT LIKE '%[^0-9]%' then col else '' end,
case when col LIKE '%[^0-9]%' then col else '' end
FROM <YOURTABLE>
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply