Split a row into multiple rows

Saranya Boopathi
Posted by Saranya Boopathi under Sql Server category on | Points: 40 | Views : 785
SELECT IDENTITY(INT,1,1) AS Id, A.[Sender Name],A.[Sender Mobile] INTO #Final FROM
(
SELECT T.SenderName [Sender Name],T.SenderMobile [Sender Mobile] FROM Mobile T
UNION ALL
SELECT T.SendToName [Sender Name],T.SendToMobile [Sender Mobile] FROM Mobile T
)A

Comments or Responses

Login to post response