I have a problem where I need to use a subquery in combination with a Left 
Join. The SQL statement below works fine until I introduce the subquery 
portion. Specifically, 

WHERE testplans.plantriggers_ID_FK IN (SELECT plantriggers.ID  FROM 
plantriggers  WHERE (((plantriggers.testplan_intro_PlanID_FK)=1)))

Can someone point out where the error is. I double checked the column 
name/tables names in the above portion and as I said the main body worked prior 
to introduction of the subquery. I've also tried replacing the IN operand with 
an = with no luck.
 
 
Full SQL statement:
 
SELECT testplans.SubTestCaseKey,  testcase_root.ID, 
testplans.testcasesuffix_name_FK,  testcase_root.TestID, 
testcase_root.TestDesc, testplans.FSAGA,  testplans.Priority, 
testplans.tester_list_Name_FK  FROM testcase_root LEFT JOIN testplans ON 
testcase_root.ID =  testplans.testcase_root_ID_FK  WHERE 
testplans.plantriggers_ID_FK IN (SELECT plantriggers.ID  FROM plantriggers  
WHERE (((plantriggers.testplan_intro_PlanID_FK)=1)))
  ORDER BY testcase_root.TestID;

Robert M. Bartis 
Lucent Technologies, Inc 
Tel: +1 732 949 4565 
Mail: <[EMAIL PROTECTED]> 
Pgr: <[EMAIL PROTECTED]> 

 

Reply via email to