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 many databases Microsoft SQL server provides?

612


What are the rules to use the rowguidcol property to define a globally unique identifier column?

593


Explain about unique identifier data type in sql server?

515


How many types of local tables are there in sql server?

510


Write SQL queries on Self Join and Inner Join.

619






Will count(column) include columns with null values in its count?

670


Explain the use of containers in ssis?

536


Why functions are used in sql server?

508


How to return the second 5 rows in ms sql server?

634


You are designing a database for your human resources department in the employee table, there is a field for social security number, which cannot contain null values if no value is given, you want a value of unknown to be inserted in this field what is the best approach?

627


What is sub-query in sql server? Explain its properties.

582


What Are the Main Features of SQL Azure?

95


Explain what are sparse columns?

570


Why SQL Agent is used?

602


How do I find information about the install locations for the various instances running on a computer?

556