﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2008 / T-SQL (SS2K8)  / Query help..... / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Thu, 23 May 2013 06:53:15 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Query help.....</title><link>http://www.sqlservercentral.com/Forums/Topic1428716-392-1.aspx</link><description>Duplicate post. Direct replies here. [url=http://www.sqlservercentral.com/Forums/Topic1428706-391-1.aspx]http://www.sqlservercentral.com/Forums/Topic1428706-391-1.aspx[/url]</description><pubDate>Fri, 08 Mar 2013 12:37:30 GMT</pubDate><dc:creator>Sean Lange</dc:creator></item><item><title>Query help.....</title><link>http://www.sqlservercentral.com/Forums/Topic1428716-392-1.aspx</link><description>Hi All,can any one help on below query declare @tbl table (TBLID int identity(1,1),ID int,patientName varchar(10),age int,city varchar(100),Mobile int)insert @tbl(ID,patientName,age,city,Mobile) select 1,'Ramesh',20,'HYD',12345678 union allselect 1,'Ramesh new',20,'HYDERABAD ' ,12345678 union allselect 1,'Ramesh new',20,'HYDERABAD ' ,87654321select * from @tbl TBLID ID	 patientName age	 city            Mobile1	 1	 Ramesh	   20   HYD           123456782	 1	 Ramesh        24	 HYD           123456783	 1	 Ramesh new  20	 HYDERABAD 87654321i want output as mentioned below format which columns data got changed Columns        OLDDATA   NEWDATApatientName  Ramesh      Ramesh newCity              HYD          HYDERABAD Mobile          12345678    87654321can any one help on this</description><pubDate>Fri, 08 Mar 2013 11:42:19 GMT</pubDate><dc:creator>cooljagadeesh</dc:creator></item></channel></rss>