Nested Select Statements

Purdue2479

Registered User.
Local time
Today, 23:03
Joined
Jul 1, 2003
Messages
52
I am trying to combine the below queries into one using nested Select statements, but I am not having any luck. Any examples on how to do this would be appreciated. Thanks

Code:
qry1000_006_01-Base4 syntax:

       SELECT RIVMTRM0_STDY_GRP_TST_REMARK.IVMSGRP, RIVMTRM0_STDY_GRP_TST_REMARK.IVMTESTSN
       FROM RIVMTRM0_STDY_GRP_TST_REMARK
       GROUP BY RIVMTRM0_STDY_GRP_TST_REMARK.IVMSGRP, RIVMTRM0_STDY_GRP_TST_REMARK.IVMTESTSN
       HAVING (((Count([IVMSGRP])<>Max([IVMRMKSN]))=-1));


SELECT [qry1000_006_01-Base4].IVMSGRP, [qry1000_006_01-Base4].IVMTESTSN, RIVMTRM0
_STDY_GRP_TST_REMARK.IVMRMKSN, RIVMTRM0_STDY_GRP_TST_REMARK.IVMRMK
FROM [qry1000_006_01-Base4] INNER JOIN RIVMTRM0_STDY_GRP_TST_REMARK ON ([qry1000_006_01-Base4].IVMSGRP = 
RIVMTRM0_STDY_GRP_TST_REMARK.IVMSGRP) AND ([qry1000_006_01-Base4].IVMTESTSN = RIVMTRM0
_STDY_GRP_TST_REMARK.IVMTESTSN);
 
Purdue,

It would help if you could give an explanation of what this is supposed to do, in terms of its purpose (in relation to your work). It helps sometimes to read (in english / words) what the person is trying to accomplish.

One thing that I see right away is an aggregate function that is conditionalized by another aggregate function. That doesn't mix very well.
 

Users who are viewing this thread

Back
Top Bottom