Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Show Query. Help translating Select statement to ASP

Status
Not open for further replies.

ynott

Technical User
Sep 26, 2000
49
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top