Posted by Erland Sommarskog on 06/04/07 07:23
Ben (nospam@devdex.com) writes:
> I have to update a column in Table A based on 3 other columns in Table A
> itself. I have an excel matrix like so
>
>
> Column2-Value1 Column3-Value1 Column2-Value2
>
> Column1-Value1 A B C
> Column1 - Value2 V W X
>
>
> and so on.. I am not able to think of a smart way to design this other
> that the case statements?
It's not clear to me what the rules for the update are. For this kind of
question, it's always a good idea that you post:
o CREATE TABLE statement for your table.
o INSERT statements with sample data.
o The desired result given the sample.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|