Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-sqlserver > #1872
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Lennart Jonsson <erik.lennart.jonsson@gmail.com> |
| Newsgroups | comp.databases.ms-sqlserver |
| Subject | Re: Sql question |
| Date | Mon, 02 Feb 2015 08:45:09 +0100 |
| Organization | A noiseless patient Spider |
| Lines | 42 |
| Message-ID | <man9t2$mk3$1@dont-email.me> (permalink) |
| References | <mafpue$d3c$1@dont-email.me> <magl5q$cfh$1@dont-email.me> <1f5aad6b-a99e-48c3-adde-5f72eea5793b@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Mon, 2 Feb 2015 07:44:35 +0000 (UTC) |
| Injection-Info | mx02.eternal-september.org; posting-host="5f53882e1b0b5de864e88de647f19c93"; logging-data="23171"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+L7Wu7QdGMsvU60e28VX1v" |
| User-Agent | Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 |
| In-Reply-To | <1f5aad6b-a99e-48c3-adde-5f72eea5793b@googlegroups.com> |
| Cancel-Lock | sha1:hRVrScLrg3kpMvB5dNIdqUEG50g= |
| Xref | csiph.com comp.databases.ms-sqlserver:1872 |
Show key headers only | View raw
On 2015-02-02 07:16, rja.carnegie@gmail.com wrote: [...] > I wonder if you need to write the statement as a JOIN > given that we know we're interested in "wives" of > employee id = 3. Why not just: > > SELECT * FROM Employee WHERE EmpPartner = 3; > Yes, good observation > This is a strange problem in many ways. One database > seems to contain multiple firms and their employees, > and the tax authorities get to use it as well? > And it's implied that any possible wife is recorded > in the employee table? > Agreed [...] > > Enforcement would meant that only one Employee - > one wife - can have EmpPartner = 3. > > I'm not sure how to write that rule. > UNIQUE ( EmpPartner ); > Anyway, maybe the database designer anticipated > legal polygamy if Mitt Romney had won. > :-) [...]
Back to comp.databases.ms-sqlserver | Previous | Next — Previous in thread | Next in thread | Find similar
Sql question "Tony Johansson" <johansson.andersson@telia.com> - 2015-01-30 12:29 +0100
Re: Sql question Lennart Jonsson <erik.lennart.jonsson@gmail.com> - 2015-01-30 20:14 +0100
Re: Sql question rja.carnegie@gmail.com - 2015-02-01 22:16 -0800
Re: Sql question Lennart Jonsson <erik.lennart.jonsson@gmail.com> - 2015-02-02 08:45 +0100
Re: Sql question "Tony Johansson" <johansson.andersson@telia.com> - 2015-02-03 01:06 +0100
Re: Sql question rja.carnegie@gmail.com - 2015-02-03 09:06 -0800
csiph-web