List:General Discussion« Previous MessageNext Message »
From:Robert M (Bob) Bartis Date:May 25 2005 10:28pm
Subject:Subquery question
View as plain text  
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

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: <bartis@stripped> 
Pgr: <rmbartis@stripped> 


Subquery questionBob)26 May
RE: Subquery questionBob)26 May
  • Re: Subquery questionDan Nelson26 May
RE: Subquery questionBob)26 May