Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ashley.sql
Constraint Violating Yak Guru
299 Posts |
Posted - 2006-08-14 : 21:11:38
|
I want to create a table which has co-relation among one column IDSay I have values in a column A, B, C, D, E, and Fthere is this relation between them A B C D E FA 1 3 4 5 2 7 B 1C 1D 1E 1F 1This means co-relation between A, B is 3A,C is 4A, D is 5A, E is 2 and so on.So how would i create a table like this and I should be able to select the maximum or minimum correlation according to requeirement from a group of correlations.like from the above data minimum is A,E = 2and maximum is A, D = 5there will be other groups like B, C and C,E and C,D and E,F will also be there and will have a corelation between them.Ashley Rhodes |
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2006-08-14 : 23:03:37
|
WTF???CODO ERGO SUM |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-08-15 : 03:39:55
|
Create a table with three columns. First column is the "from group", second column is "to group" and the third column is the co-relation between the two groups. Keep the data normalized.Then just add data as needed and select withselect [third column]from [my table]where [first column] = 'a' and [second column] = 'e' or [first column] = 'e' and [second column] = 'a' Peter LarssonHelsingborg, Sweden |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-08-15 : 03:43:28
|
quote: Originally posted by Michael Valentine Jones WTF???
Is it dead, Michael? Peter LarssonHelsingborg, Sweden |
|
|
|
|
|
|
|