A
Atlas
I have two tables:
A) ID_A, fieldx, fieldy, fieldz
B) ID_B, ID_A, fieldDate, fieldu,fildv, fieldw
relationship: 1 to many
I would like to build a query that selects all records from A and (IF ANY,
non exclusive!!!!) records from B meeting date range. Unfortunatelly using
the query below, keeps out from results all parents from A with no childs in
B.
SELECT A.*, B.*
FROM A
INNER JOIN B ON A.ID_A = B.ID_A
WHERE (B.fieldDate >= CONVERT(DATETIME, '01-01-2004 00:00:00', 105) AND
(B.fieldDate <= CONVERT(DATETIME, '31-12-2004 00:00:00', 105)
What can I try?
A) ID_A, fieldx, fieldy, fieldz
B) ID_B, ID_A, fieldDate, fieldu,fildv, fieldw
relationship: 1 to many
I would like to build a query that selects all records from A and (IF ANY,
non exclusive!!!!) records from B meeting date range. Unfortunatelly using
the query below, keeps out from results all parents from A with no childs in
B.
SELECT A.*, B.*
FROM A
INNER JOIN B ON A.ID_A = B.ID_A
WHERE (B.fieldDate >= CONVERT(DATETIME, '01-01-2004 00:00:00', 105) AND
(B.fieldDate <= CONVERT(DATETIME, '31-12-2004 00:00:00', 105)
What can I try?