I think I got it wrong in my first reply:
SELECT Table2.*
FROM Table2
INNER JOIN (SELECT table1.inci_id
FROM Table1
WHERE table1.inci_id = thisform.pcInci_Id
or table1.inci_Id = thisform.pcParent_Id
or table1.parent_id = thisform.pcInci_Id
or (LEN(table1.parent_id)>0 AND table1.parent_id = thisform.pcParent_Id)) Tbl1
ON Table2.inci_id = Tbl1.inci_id
Is this SQL Server query or VFP one?
If it is SQL Server you should use a parameters instead of thisform properties, even if it is VFP one I prefer to iuse variables instead of properties.
>I did that Naomi but I keep getting the error at EXISTS. Given my day Friday, perhaps it is as simple as a typo, so I will double-check that...
>
>
>
>>>Tables exist SQL2000 or SQL2005:
>>>
>>>I have 2 string values: thisform.pcInci_Id and thisform.pcParent_Id
>>>I want to pull all records from one table whose inci_id value exists in a result from another table
>>>
>>>
>>>Long Way:
>>>
>>>1. Retrieve table1.inci_id field from all records in table1 where
>>> table1.inci_id = thisform.pcInci_Id
>>> or table1.inci_Id = thisform.pcParent_Id
>>> or table1.parent_id = thisform.pcInci_Id
>>> or (LEN(table1.parent_id)>0 AND table1.parent_id = thisform.pcParent_Id)
>>>
>>>2. Get all fields in all records in table2 where
>>> table2.inci_id is in (the cursor result created in step 1)
>>>
>>>
>>>For some reason I am stumped on the short way! Any ideas?
>>
>>
>>select * from Table1 where exists (select * from ... )
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.