Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-sqlserver > #1823
| X-Received | by 10.236.66.102 with SMTP id g66mr862981yhd.3.1414475263934; Mon, 27 Oct 2014 22:47:43 -0700 (PDT) |
|---|---|
| X-Received | by 10.140.101.227 with SMTP id u90mr2079qge.18.1414475263691; Mon, 27 Oct 2014 22:47:43 -0700 (PDT) |
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!u7no645264qaz.1!news-out.google.com!u5ni13qab.1!nntp.google.com!u7no645258qaz.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | comp.databases.ms-sqlserver |
| Date | Mon, 27 Oct 2014 22:47:43 -0700 (PDT) |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=96.242.58.190; posting-account=WG_AKQoAAABOEUiyIf1Ow04_BDE0XUgq |
| NNTP-Posting-Host | 96.242.58.190 |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <67650eda-707d-45f5-9007-11852cc7fe86@googlegroups.com> (permalink) |
| Subject | data retrieve on parent and many child instances |
| From | Raul Rego <rrego@pmchnnj.org> |
| Injection-Date | Tue, 28 Oct 2014 05:47:43 +0000 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-Received-Bytes | 1727 |
| X-Received-Body-CRC | 2516912952 |
| Xref | csiph.com comp.databases.ms-sqlserver:1823 |
Show key headers only | View raw
I have the following Select:
SELECT
ToxPat.CaseNumber, ToxPat.StartDate, ToxExpSub.SubDesc, ToxExpSub.SubPoisindexCode, CodeValue.CodeValue as 'Call Type'
from ToxExpSub, Toxpat
inner join CodeValue
on (codevalue.CodeID = toxpat.calltype)
where ToxExpSub.SubPoisindexCode = 6931087 and ToxPat.CaseNumber = ToxExpSub.CaseNumber
This works good but only gets all matches for Poisendexcode=6931087
My problem is that there could be many records in child table ToxExpSub for casenumber = toxpat.casenumber; therefore, there could be many child records even only one matches poisendexcode=6931087.
I will like all records on table ToxExpsub for canumber = Toxpat.casenumber if one of them has poisendexcode = 6931087
Back to comp.databases.ms-sqlserver | Previous | Next — Next in thread | Find similar
data retrieve on parent and many child instances Raul Rego <rrego@pmchnnj.org> - 2014-10-27 22:47 -0700
Re: data retrieve on parent and many child instances Lennart Jonsson <erik.lennart.jonsson@gmail.com> - 2014-10-28 07:08 +0100
Re: data retrieve on parent and many child instances Raul Rego <rrego@pmchnnj.org> - 2014-10-28 02:54 -0700
Re: data retrieve on parent and many child instances Erland Sommarskog <esquel@sommarskog.se> - 2014-10-28 11:37 +0000
csiph-web