Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-sqlserver > #1820 > unrolled thread
| Started by | seb <gekonik@poczta.fm> |
|---|---|
| First post | 2014-10-26 08:20 +0100 |
| Last post | 2014-10-26 10:49 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.databases.ms-sqlserver
compare two rows seb <gekonik@poczta.fm> - 2014-10-26 08:20 +0100
Re: compare two rows Erland Sommarskog <esquel@sommarskog.se> - 2014-10-26 10:49 +0100
| From | seb <gekonik@poczta.fm> |
|---|---|
| Date | 2014-10-26 08:20 +0100 |
| Subject | compare two rows |
| Message-ID | <m2i7bf$9aq$1@node2.news.atman.pl> |
hello i have 2 rows ,who have the same value but in other columnes how to check diffrence betwwen them example: 2,'something',something2,null,6 3,'something5',something8,6,7 the same value is 6 how to check in wchich columnes is diffrent bettwen them?
[toc] | [next] | [standalone]
| From | Erland Sommarskog <esquel@sommarskog.se> |
|---|---|
| Date | 2014-10-26 10:49 +0100 |
| Message-ID | <XnsA3D26E1D9869BYazorman@127.0.0.1> |
| In reply to | #1820 |
seb (gekonik@poczta.fm) writes: > i have 2 rows ,who have the same value but in other columnes how to > check diffrence betwwen them > > example: > > 2,'something',something2,null,6 > 3,'something5',something8,6,7 > > the same value is 6 how to check in wchich columnes is diffrent bettwen > them? > I'm not sure that this makes any sense to me. Two rows, the value 6 appears in both, but in different columns? And? A table is supposed to model a unique entity and each column is supposed to model a unique attribute of that entity. So if on one row, the column apple has the value 6, and on another row the column orange has the value 6, you would still be comparing apples and oranges. So maybe your real problem is that your database design is not the best one. But apart from that, I don't really understand "wchich columnes is diffrent bettwen them?". In the example above, what output do you want? -- Erland Sommarskog, Stockholm, esquel@sommarskog.se
[toc] | [prev] | [standalone]
Back to top | Article view | comp.databases.ms-sqlserver
csiph-web