D
Daniel M
Can someone tell me why the following 2 statements do not contain the same
amount of line items?
SELECT boardid, min(dateinput) AS FirstDate, min(id) AS FirstID
FROM boardid
WHERE [component reference]='NA' and ReasonCode='NA'
GROUP BY boardid;
SELECT *
FROM boardid AS t1, [Batterycheck pt3] AS t3
WHERE t1.boardid=t3.boardid and
t1.dateinput = t3.FirstDate and
t1.id=t3.FirstID
ORDER BY t1.boardid;
The first one just selects boardid, dateinput and id and the second one just
selects all columns where boardid, dateinput and id are the same as the first
query. I dont understand the results. The first one pulls 13868 records while
the second one pulls 13797 records. If i pull out the
't1.dateinput=t3.FirstDate' they pull the same amount of records.
amount of line items?
SELECT boardid, min(dateinput) AS FirstDate, min(id) AS FirstID
FROM boardid
WHERE [component reference]='NA' and ReasonCode='NA'
GROUP BY boardid;
SELECT *
FROM boardid AS t1, [Batterycheck pt3] AS t3
WHERE t1.boardid=t3.boardid and
t1.dateinput = t3.FirstDate and
t1.id=t3.FirstID
ORDER BY t1.boardid;
The first one just selects boardid, dateinput and id and the second one just
selects all columns where boardid, dateinput and id are the same as the first
query. I dont understand the results. The first one pulls 13868 records while
the second one pulls 13797 records. If i pull out the
't1.dateinput=t3.FirstDate' they pull the same amount of records.