I have to tables - demographics and PatSubs. Both tables are linked by caseno filed.
Now, PatSubs may have one or many substance entry for the caseno.
If I do the following:
USE [njpies2013]
GO
SELECT [CaseNumber]
,[CenterCode]
,[YearCode]
,[SubVerbatim]
FROM [dbo].[ToxExpSub]
where SubPoisindexCode = 6931087
GO
I will only get the cases in PatSub that match =693107; however what I want is if there's a record with PoisendexCode 6931087 than give me all the entries in PatSub for THAT caseno
Please help me with this query,
Thanks
Raul
Raul Rego