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

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
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 Wed, 13 Jul 2011 12:14:41 -0700
Organization A noiseless patient Spider
Lines 14
Message-ID <bjrr17lr6l767hnesvfdq9cpn6ba6de7nv@4ax.com> (permalink)
References <cpap17l6g8qsntt5703ja4m6mr8osq287i@4ax.com> <4E1DD860.5CE2D6C7@xs4all.nl>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Injection-Info mx04.eternal-september.org; posting-host="7Qrvczazr82YckO5XW8Vtw"; logging-data="15857"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+g60e2SZP652SgoJEcLn//pW0Q7Ph/6Lc="
X-Newsreader Forte Agent 4.2/32.1118
Cancel-Lock sha1:Z7U4HWAZ0/4vmf29a3sH/R7DLGw=
Xref x330-a1.tempe.blueboxinc.net comp.databases.ms-sqlserver:510

Cross-posted to 2 groups.

Show key headers only | 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