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 |
|
marat
Yak Posting Veteran
85 Posts |
Posted - 2006-05-18 : 00:08:39
|
| Hi allI have table <tbl1>col1 col21 22 33 45 107 10I need output in table <tbl2> to look likecol1 col21 21 31 45 75 10 What would be a solution for this task?Thanks |
|
|
PSamsig
Constraint Violating Yak Guru
384 Posts |
Posted - 2006-05-18 : 01:14:28
|
| First of, please tell what the correlation is between these two tables, I for one fail to see it ...-- This one's tricky. You have to use calculus and imaginary numbers for this. You know, eleventeen, thirty-twelve and all those. |
 |
|
|
marat
Yak Posting Veteran
85 Posts |
Posted - 2006-05-18 : 01:34:55
|
| These are references of duplicate records.Thanks |
 |
|
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2006-05-18 : 01:41:57
|
| what do you mean by References of duplicate records?? can you be more clearIf Debugging is the process of removing Bugs then i Guess programming should be process of Adding them. |
 |
|
|
marat
Yak Posting Veteran
85 Posts |
Posted - 2006-05-18 : 02:40:20
|
| OK,Say I have a table <tbl1>col1 col2 col3 ...colN............................................where col1 is URNI want produce a table <tbl2>colA colB..................populated with references of duplicate recordsfrom tbl1 on fields, say col5, col11, col25where colA would be a master URN(min URN for the set of dupes) and colB would be a URN of duplicate record. |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-05-18 : 05:38:00
|
quote: I have table <tbl1>col1 col21 22 33 45 107 10
quote: Say I have a table <tbl1>col1 col2 col3 ...colN............................................where col1 is URNI want produce a table <tbl2>colA colB
Is the source table only 2 column or multiple column ? KH |
 |
|
|
marat
Yak Posting Veteran
85 Posts |
Posted - 2006-05-18 : 08:42:08
|
| Let's start againI have table <tbl1>col1 col21 22 33 45 107 10In tbl1 I have col1 is equivalent to col2 relationshipI need output in table <tbl2> to look likecol1 col21 21 31 45 75 10 Rules are: If 1==2 and 2==3 and 3==4 ==> 1==2 and 1==3 and 1==4 If 5==10 and 7==10 ==> 5==10 and 5==7.Or in graphics: ---> is a LINK or EQUIVALENTA--->B--->C = A--->B and A--->C if A<B and A<CA--->B--->C = C--->A and C--->B if C<A and C<BA--->B--->C = B--->A and B--->C if B<A and B<CA--->B = A--->B and A--->C if A<B and A<CC--->B That's all I can tell.Thanks |
 |
|
|
|
|
|