M
mark909
I was wondring if it is possible to do a wildcard on an inner join and if so
what would be the correct SQL to get the wildcard to function?
The query im working on has multiple joins but i only need the wildcard to
function on one of them.
SELECT CIVILS_LINE.DUCT_TYPE, CIVILS_LINE.SURFACE_TYPE,
CIVILS_LINE.DETAILED_SURFACE_TYPE, Sum(CIVILS_LINE.LENGTH) AS SumOfLENGTH
FROM CIVILS_LINE INNER JOIN ROUTE_INSTALL_COSTS ON
(CIVILS_LINE.CIVILS_LINE_TYPE = ROUTE_INSTALL_COSTS.CIVILS_LINE_TYPE) AND
(CIVILS_LINE.DUCT_TYPE=ROUTE_INSTALL_COSTS.Duct_Type) AND
(CIVILS_LINE.Surface_Type = ROUTE_INSTALL_COSTS.Surface_Type) AND
(CIVILS_LINE.Detailed_Surface_Type =
ROUTE_INSTALL_COSTS.Detailed_Surface_Type)
GROUP BY CIVILS_LINE.DUCT_TYPE, CIVILS_LINE.SURFACE_TYPE,
CIVILS_LINE.DETAILED_SURFACE_TYPE, CIVILS_LINE.CIVILS_LINE_TYPE,
CIVILS_LINE.PROJECT_ID, ROUTE_INSTALL_COSTS.CONTRACTORS_CIVILS
HAVING
(((CIVILS_LINE.PROJECT_ID)=[Forms]![frmCivJobPackInst]![txtProject_ID]) AND
((ROUTE_INSTALL_COSTS.CONTRACTORS_CIVILS)=[Forms]![frmCivJobPackInst]![txtContractors_Civils]));
I want to be able to wildcard the following join within the SQL:
AND (CIVILS_LINE.DUCT_TYPE=ROUTE_INSTALL_COSTS.Duct_Type)
Thanks for any help
what would be the correct SQL to get the wildcard to function?
The query im working on has multiple joins but i only need the wildcard to
function on one of them.
SELECT CIVILS_LINE.DUCT_TYPE, CIVILS_LINE.SURFACE_TYPE,
CIVILS_LINE.DETAILED_SURFACE_TYPE, Sum(CIVILS_LINE.LENGTH) AS SumOfLENGTH
FROM CIVILS_LINE INNER JOIN ROUTE_INSTALL_COSTS ON
(CIVILS_LINE.CIVILS_LINE_TYPE = ROUTE_INSTALL_COSTS.CIVILS_LINE_TYPE) AND
(CIVILS_LINE.DUCT_TYPE=ROUTE_INSTALL_COSTS.Duct_Type) AND
(CIVILS_LINE.Surface_Type = ROUTE_INSTALL_COSTS.Surface_Type) AND
(CIVILS_LINE.Detailed_Surface_Type =
ROUTE_INSTALL_COSTS.Detailed_Surface_Type)
GROUP BY CIVILS_LINE.DUCT_TYPE, CIVILS_LINE.SURFACE_TYPE,
CIVILS_LINE.DETAILED_SURFACE_TYPE, CIVILS_LINE.CIVILS_LINE_TYPE,
CIVILS_LINE.PROJECT_ID, ROUTE_INSTALL_COSTS.CONTRACTORS_CIVILS
HAVING
(((CIVILS_LINE.PROJECT_ID)=[Forms]![frmCivJobPackInst]![txtProject_ID]) AND
((ROUTE_INSTALL_COSTS.CONTRACTORS_CIVILS)=[Forms]![frmCivJobPackInst]![txtContractors_Civils]));
I want to be able to wildcard the following join within the SQL:
AND (CIVILS_LINE.DUCT_TYPE=ROUTE_INSTALL_COSTS.Duct_Type)
Thanks for any help