|
-
Jun 25th, 2007, 08:18 AM
#1
[RESOLVED] [SQL Server 2005] SQL question Complicated join
Ok here is where I am at. I have the following tables
LabAddress
--LabAddressPK
--etc...
ACToAddress
--ACToAddressPK
--LabAddressPK
--AnalysisCodePK
SampleAC
--SampleACPK
--SamplePK
--AnalysisCodePK
Samples
--SamplePK
--etc...
Essentially what it is is that I have Labs that can have multiple addresses. Assigned to these addresses are multiple Analysis Codes they can perform.
I then have samples that have specific Analysis Codes assigned to them.
What I need to be able to return is the samples that a specific lab address can analyze. So the input would be the LabAddressPk and I need to return all the SamplePK that that lab address can perform. So I am kind of lost on how to do this and any help would be appreciated.
I hope I explained what I am trying to do here well enough and if not please let me know.
Thanks,
Brian
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|