dbTalk Databases Forums  

Db Design for Matrix Lookup

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss Db Design for Matrix Lookup in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ben
 
Posts: n/a

Default Db Design for Matrix Lookup - 06-03-2007 , 09:24 PM







Hi All,
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?

Any help is appreaciated.
Thanks



*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
  #2  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Db Design for Matrix Lookup - 06-04-2007 , 02:23 AM






Ben (nospam (AT) devdex (DOT) com) writes:
Quote:
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 (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
  #3  
Old   
Ben
 
Posts: n/a

Default Re: Db Design for Matrix Lookup - 06-04-2007 , 07:33 PM





Thanks for responding Erland, I figured it out finally, will post sample
scripts and solutions soon.


Thanks all.

*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.