i have a table student like
sname
-----
ram
ram
ram
raj
raj
raj
i need the output like
sname
-----
ram
raj
ram
raj
ram
raj

Answer Posted / deepak rohilla

select (substring(name,1,3)+' '+substring(name,13,3)
+' '+substring(name,5,3)+' '+substring(name,17,3)
+' '+substring(name,9,3)+' '+substring(name,21,3))name
from employee where name like '%raj%'

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How will you find out if there are expensive SQL statements running or not?

572


List the different types of joins?

563


What is the purpose of the tempdb database?

569


What is the purpose of data source?

509


How to create database with physical files specified in ms sql server?

533






How to enforce security in sql server? : sql server security

619


how to do partition in sqlserver

1964


List out a number of the wants to setup a SQL Server failover cluster?

574


What is implicit cursors?

547


explain different types of backups avaialabe in sql server? : Sql server database administration

585


What is the beast way to write CTE in SQL Server ?

555


What are the differences between INNER JOIN, LEFT JOIN and RIGHT JOIN in SQL Server?

608


What are the reporting services components?

92


What are the aggregate and scalar functions?

515


What is the difference between coalesce() & isnull()?

530