Here's my crystal report that captures all I need for a location. I have a problem making an ASP since I'm stumped on writing the outer join that's necessary for the LOC_ID in both tables. Can someone suggest an ASP line for the outer join only please? Keep in mind that the ASP has other fields, but I'm just focusing on the LOC_ID in the Crystal Report. Thanks
Crystal View:
SELECT
INCIDENT_LOC_EVENTS_VW."INCD_EVENT_NUM", INCIDENT_LOC_EVENTS_VW."INCD_WRONG_LOC_FETUR", INCIDENT_LOC_EVENTS_VW."INCD_WRONG_STRT_NAME", INCIDENT_LOC_EVENTS_VW."INCD_WRONG_STRT_NUM",
LOCATIONS."LOC_STRT_NUM", LOCATIONS."STRT_NAME", LOCATIONS."LOC_FETUR"
FROM
{ oj "SERVER"."INCIDENT_LOC_EVENTS_VW" INCIDENT_LOC_EVENTS_VW LEFT OUTER JOIN "PSIS"."LOCATIONS" LOCATIONS ON
INCIDENT_LOC_EVENTS_VW."LOC_ID" = LOCATIONS."LOC_ID"}
WHERE
INCIDENT_LOC_EVENTS_VW."INCD_EVENT_NUM" LIKE '200100%'
ASP VIEW:
SQL = "SELECT INCIDENT_LOC_EVENTS_VW.INCD_EVENT_NUM, INCIDENT_LOC_EVENTS_VW.CODE_NUM, INCIDENT_LOC_EVENTS_VW.INCD_WRONG_LOC_FETUR, INCIDENT_LOC_EVENTS_VW.INCD_CLSFN_NUM, INCIDENT_LOC_EVENTS_VW.INCD_DISPO_NUM, INCIDENT_LOC_EVENTS_VW.INCD_WRONG_STRT_NAME, INCIDENT_LOC_EVENTS_VW.INCD_WRONG_STRT_NUM, INCIDENT_LOC_EVENTS_VW.INCD_CALL_TIME, LOCATIONS.LOC_STRT_NUM, LOCATIONS.STRT_NAME, LOCATIONS.LOC_FETUR"
SQL = SQL & " FROM INCIDENT_LOC_EVENTS_VW, LOCATIONS"
SQL = SQL & " WHERE INCIDENT_LOC_EVENTS_VW.INCD_EVENT_NUM LIKE '" & eventnum & "' AND"
SQL = SQL & " INCIDENT_LOC_EVENTS_VW.LOC_ID = LOCATIONS.LOC_ID"
set rs99 = my_conn.Execute(SQL)
Thanks
Crystal View:
SELECT
INCIDENT_LOC_EVENTS_VW."INCD_EVENT_NUM", INCIDENT_LOC_EVENTS_VW."INCD_WRONG_LOC_FETUR", INCIDENT_LOC_EVENTS_VW."INCD_WRONG_STRT_NAME", INCIDENT_LOC_EVENTS_VW."INCD_WRONG_STRT_NUM",
LOCATIONS."LOC_STRT_NUM", LOCATIONS."STRT_NAME", LOCATIONS."LOC_FETUR"
FROM
{ oj "SERVER"."INCIDENT_LOC_EVENTS_VW" INCIDENT_LOC_EVENTS_VW LEFT OUTER JOIN "PSIS"."LOCATIONS" LOCATIONS ON
INCIDENT_LOC_EVENTS_VW."LOC_ID" = LOCATIONS."LOC_ID"}
WHERE
INCIDENT_LOC_EVENTS_VW."INCD_EVENT_NUM" LIKE '200100%'
ASP VIEW:
SQL = "SELECT INCIDENT_LOC_EVENTS_VW.INCD_EVENT_NUM, INCIDENT_LOC_EVENTS_VW.CODE_NUM, INCIDENT_LOC_EVENTS_VW.INCD_WRONG_LOC_FETUR, INCIDENT_LOC_EVENTS_VW.INCD_CLSFN_NUM, INCIDENT_LOC_EVENTS_VW.INCD_DISPO_NUM, INCIDENT_LOC_EVENTS_VW.INCD_WRONG_STRT_NAME, INCIDENT_LOC_EVENTS_VW.INCD_WRONG_STRT_NUM, INCIDENT_LOC_EVENTS_VW.INCD_CALL_TIME, LOCATIONS.LOC_STRT_NUM, LOCATIONS.STRT_NAME, LOCATIONS.LOC_FETUR"
SQL = SQL & " FROM INCIDENT_LOC_EVENTS_VW, LOCATIONS"
SQL = SQL & " WHERE INCIDENT_LOC_EVENTS_VW.INCD_EVENT_NUM LIKE '" & eventnum & "' AND"
SQL = SQL & " INCIDENT_LOC_EVENTS_VW.LOC_ID = LOCATIONS.LOC_ID"
set rs99 = my_conn.Execute(SQL)
Thanks