You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. Address END FROM Employee Table ET INNER JOIN (SELECT Emp Id,  First Name,  Last Name,  Address FROM (SELECT Emp Id, New Value, Id FROM Value Table) VT PIVOT ( MAX(New Value) FOR Id IN (, , ) ) PVT) UT ON ET. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. By joining today you can post your own programming questions, respond to other developers questions, and eliminate the ads that are displayed to guests. Hii Alll Is it possible to update multiple column based on case statement?? Hi Everyone how should i update multiple columns of a table from another table...Suppose I have table A and B and having four columns each table A(col1,col2,col3,col4) B(col1,col2,col3,col4) then how should i do something like this update A set(col2,col4)=(select B.col2, B.col4 from B where B.col1=A.col1 and A.col3=A.col3) Please help..........A requirement arises in many systems to update multiple SQL database rows.
(If using an earlier version then you can still create the cross tab table but it's messier.) UPDATE Employee Table SET First Name = CASE ET.
Do all of you have a copy of your SQL Reference manual?
Every major database system, whether proprietary or open source, has a manual which you can browse for free on the Web.
New Value Else employee Table.lastname End, address = CASE When(employee Table.address ='N' and ID=30) THEN Value Table.
New Value Else employee Table.address End FROM Value Table where employee Table. Empid Any pointer will be great help Cheers :) vinod Cheers :) vinod Are you using SQL Server 2005?