Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
mysweet
Starting Member
3 Posts |
Posted - 2013-04-20 : 01:04:46
|
Hi Team,I need query to split string into individual characters and each character will display in separate row.For Example, I have a word like mysweet the output should bemysweetI am new to oracle.can you please provide the query for this.Thanks in Advancelakshmi Reddy |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-04-20 : 02:37:41
|
in t-sql you can do like thisDECLARE @Word varchar(100)SET @Word = 'mysweet';With Numbers(SELECT 1 AS NUNION ALLSELECT N + 1FROM NumbersWHERE N + 1 <= LEN(@Word))SELECT SUBSTRING(@Word,N,1)FROM NumbersOPTION (MAXRECURSION 0) Dunno about Oracle. For Oracle related question try in oracle forums like www.dbforums.comThis is MS SQL Server forum------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
 |
|
|
|
|