R
RC
Hi,
I have the following queries, is it possible to place one inside the
other (sub query)
Test1
SELECT TableC.PID_No, Trim([PID_End_Date]) AS End_Date
FROM TableC
GROUP BY TableC.PID_No, Trim([PID_End_Date])
HAVING (((Trim([PID_End_Date])) Is Not Null)) AND (((Trim
([PID_End_Date]))<>""));
Test2
SELECT TableC.PID_No, TableC.PID_End_Date
FROM TableC INNER JOIN test1 ON TableC.PID_No=test1.PID_No
WHERE (((TableC.PID_End_Date) Is Null));
The first query groups by PID No where End date is not null
The second query looks at the first query but brings back end date
that are null
TableC contains multiple PID_No some of which don’t have end date and
they need to , so I need a query that displays 'missing' end dates
Test1
PID_No PID_End_Date
855180-454 20090831
854121-21 20090831
669027-1666 20090831
826760-15 20090831
733195-4 20090831
885674-14 20090831
731699-1317 20090831
727250-326 20090831
675083-5 20090831
896534-1451 20090831
682339-1 20090831
892051-284 20090831
Test2
PID_No PID_End_Date
1899348-2
1729598-12
839213-9
839213-9
260898-4
260898-4
260898-4
260898-4
Any help would be great, thank you
R
I have the following queries, is it possible to place one inside the
other (sub query)
Test1
SELECT TableC.PID_No, Trim([PID_End_Date]) AS End_Date
FROM TableC
GROUP BY TableC.PID_No, Trim([PID_End_Date])
HAVING (((Trim([PID_End_Date])) Is Not Null)) AND (((Trim
([PID_End_Date]))<>""));
Test2
SELECT TableC.PID_No, TableC.PID_End_Date
FROM TableC INNER JOIN test1 ON TableC.PID_No=test1.PID_No
WHERE (((TableC.PID_End_Date) Is Null));
The first query groups by PID No where End date is not null
The second query looks at the first query but brings back end date
that are null
TableC contains multiple PID_No some of which don’t have end date and
they need to , so I need a query that displays 'missing' end dates
Test1
PID_No PID_End_Date
855180-454 20090831
854121-21 20090831
669027-1666 20090831
826760-15 20090831
733195-4 20090831
885674-14 20090831
731699-1317 20090831
727250-326 20090831
675083-5 20090831
896534-1451 20090831
682339-1 20090831
892051-284 20090831
Test2
PID_No PID_End_Date
1899348-2
1729598-12
839213-9
839213-9
260898-4
260898-4
260898-4
260898-4
Any help would be great, thank you
R