Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #510

Re: SSE 2008: Referring to Other Rows Being Added

From Gene Wirchenko <genew@ocis.net>
Newsgroups comp.databases.ms-sqlserver, microsoft.public.sqlserver.programming
Subject Re: SSE 2008: Referring to Other Rows Being Added
Date 2011-07-13 12:14 -0700
Organization A noiseless patient Spider
Message-ID <bjrr17lr6l767hnesvfdq9cpn6ba6de7nv@4ax.com> (permalink)
References <cpap17l6g8qsntt5703ja4m6mr8osq287i@4ax.com> <4E1DD860.5CE2D6C7@xs4all.nl>

Cross-posted to 2 groups.

Show all headers | View raw


On Wed, 13 Jul 2011 19:39:44 +0200, Gert-Jan Strik
<sorrytoomuchspamalready@xs4all.nl> wrote:

>A simple/simpler solution would be to always sort the values. In other
>words, to enforce that A is always lower or equal to B, both in the
>table and whenever you do inserts. That way you don't need two rows for
>each pair. In the table, this can be enforced with CHECK (a <= b)

     You are over-optimising.  My example was an example of other rows
having to be checked, not the only such case.

Sincerely,

Gene Wirchenko

Back to comp.databases.ms-sqlserver | Previous | NextPrevious in thread | Find similar


Thread

SSE 2008: Referring to Other Rows Being Added Gene Wirchenko <genew@ocis.net> - 2011-07-12 13:20 -0700
  Re: SSE 2008: Referring to Other Rows Being Added Erland Sommarskog <esquel@sommarskog.se> - 2011-07-12 23:55 +0200
    Re: SSE 2008: Referring to Other Rows Being Added Gene Wirchenko <genew@ocis.net> - 2011-07-12 15:37 -0700
      Re: SSE 2008: Referring to Other Rows Being Added Erland Sommarskog <esquel@sommarskog.se> - 2011-07-13 10:16 +0200
  Re: SSE 2008: Referring to Other Rows Being Added Gert-Jan Strik <sorrytoomuchspamalready@xs4all.nl> - 2011-07-13 19:39 +0200
    Re: SSE 2008: Referring to Other Rows Being Added Gene Wirchenko <genew@ocis.net> - 2011-07-13 12:14 -0700

csiph-web