Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-sqlserver > #1830
| From | Lennart Jonsson <erik.lennart.jonsson@gmail.com> |
|---|---|
| Newsgroups | comp.databases.ms-sqlserver |
| Subject | Re: multiple JOIN for same table and column lookup |
| Date | 2014-10-28 13:33 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <m2o2es$bjd$1@dont-email.me> (permalink) |
| References | <415a780c-2e4c-4f20-9571-c8de38856cdf@googlegroups.com> |
On 2014-10-28 11:02, Raul Rego wrote:
> I have the following select:
> ELECT ToxPat.CaseNumber, ToxPat.StartDate, ToxExpSub.SubDesc
>
> , ToxExpSub.SubPoisindexCode, CodeValue.CodeValue as 'Call Type'
> from ToxExpSub
>
> join Toxpat
> on ToxPat.CaseNumber = ToxExpSub.CaseNumber
> join CodeValue
> on codevalue.CodeID = toxpat.calltype
>
> I just received valuable help on how to retrieve child records NOW I need help on the select codevalue.codevalue AND join CodeValue
> on codevalue.CodeID = toxpat.calltype
>
> I have many columns with numeric entries where their vertatim values or in the table codevalue thus:
> I need multiple JOIN codevalue on codevalue.CODEID = toxpat.reason, calltype, outcome etc.
>
> how can I do this?
>
> thanks,
>
Do you mean:
ON codevalue.CODEID IN (toxpat.reason, toxpat.calltype,
toxpat.outcome, ...)
?
/Lennart
Back to comp.databases.ms-sqlserver | Previous | Next — Previous in thread | Find similar
multiple JOIN for same table and column lookup Raul Rego <rrego@pmchnnj.org> - 2014-10-28 03:02 -0700 Re: multiple JOIN for same table and column lookup Lennart Jonsson <erik.lennart.jonsson@gmail.com> - 2014-10-28 13:33 +0100
csiph-web