F
fl
How do I combine the following two SELECT statements into one?
Is there a website out there that will show how to write better SQL
statements? I would like to learn to do without creating too many
queries to get my results. Thanks Vanderghast for showing me some
earlier.
SELECT DPXRQ001_XRV_SER_FUNC_SCTY.SER_ID_R,
DPXRQ001_XRV_SER_FUNC_SCTY.LGN_ID_R
FROM DPXRQ001_XRV_SER_FUNC_SCTY LEFT JOIN Query8 ON
(DPXRQ001_XRV_SER_FUNC_SCTY.SER_ID_R = Query8.SERIES) AND
(DPXRQ001_XRV_SER_FUNC_SCTY.LGN_ID_R = Query8.LogonID)
WHERE (((DPXRQ001_XRV_SER_FUNC_SCTY.SER_ID_R)="TICBC" Or
(DPXRQ001_XRV_SER_FUNC_SCTY.SER_ID_R)="TICBCSA"));
SELECT tblLogonID.LogonID, tblSerDef.SERIES, tblGroupID.GroupID
FROM (tblGroupID INNER JOIN tblLogonID ON tblGroupID.GroupID =
tblLogonID.GroupID) INNER JOIN tblSerDef ON tblGroupID.GroupID =
tblSerDef.GroupID
GROUP BY tblLogonID.LogonID, tblSerDef.SERIES, tblGroupID.GroupID
HAVING (((tblGroupID.GroupID)="TIC-TRAN"));
Is there a website out there that will show how to write better SQL
statements? I would like to learn to do without creating too many
queries to get my results. Thanks Vanderghast for showing me some
earlier.
SELECT DPXRQ001_XRV_SER_FUNC_SCTY.SER_ID_R,
DPXRQ001_XRV_SER_FUNC_SCTY.LGN_ID_R
FROM DPXRQ001_XRV_SER_FUNC_SCTY LEFT JOIN Query8 ON
(DPXRQ001_XRV_SER_FUNC_SCTY.SER_ID_R = Query8.SERIES) AND
(DPXRQ001_XRV_SER_FUNC_SCTY.LGN_ID_R = Query8.LogonID)
WHERE (((DPXRQ001_XRV_SER_FUNC_SCTY.SER_ID_R)="TICBC" Or
(DPXRQ001_XRV_SER_FUNC_SCTY.SER_ID_R)="TICBCSA"));
SELECT tblLogonID.LogonID, tblSerDef.SERIES, tblGroupID.GroupID
FROM (tblGroupID INNER JOIN tblLogonID ON tblGroupID.GroupID =
tblLogonID.GroupID) INNER JOIN tblSerDef ON tblGroupID.GroupID =
tblSerDef.GroupID
GROUP BY tblLogonID.LogonID, tblSerDef.SERIES, tblGroupID.GroupID
HAVING (((tblGroupID.GroupID)="TIC-TRAN"));