Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.ms-sqlserver    |    Notorious Rube Goldberg contraption    |    19,505 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 18,373 of 19,505    |
|    Gene Wirchenko to All    |
|    SSE 2008: Referring to Other Rows Being     |
|    12 Jul 11 13:20:16    |
      XPost: microsoft.public.sqlserver.programming       From: genew@ocis.net              Dear SQL'ers:               How do I force a condition based on multiple rows? I want the       necessary rows to be entered in a batch. As a simple example, what       would be the coding of the constraint in this case following?               create table Symmetric        (        a int not null,        b int not null        )               Constraint: If (x,y) is in Symmetric, then (y,x) is also in       Symmetric.               Anyone adding rows would have to do it in a batch:        insert into Symmetric        (a,b)        values        (3,5),        (5,3)               I am hoping that there is a simple answer that I am overlooking.       Right now, all I can think of is to scan both Symmetric and the batch       (Inserted).              Sincerely,              Gene Wirchenko              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca