I am trying to figure out whether or not I need to re-state "
ENGINE SQLDBC SET DEFAULT_CONNECTION SALESID" connection in each of the SQL passthrus in one webfocus procedure.
Please, which one is correct in these 2 procedures (both seem to work):
PROCEDURE 1ENGINE SQLDBC SET DEFAULT_CONNECTION SALESID
SQL SQLDBC PREPARE SQLOUT FOR SELECT STOREID, SUM(AMT) AS AMOUNT
FROM SALES.TABLEA1
LEFT JOIN
SALES.TABLEA2
WHERE REPORT_DT = TODAYS_DT
END
ENGINE SQLDBC SET DEFAULT_CONNECTION SALESID
SQL SQLDBC PREPARE SQLOUT FOR SELECT STOREID, SUM(AMT) AS AMOUNT
FROM SALES.TABLEB1
LEFT JOIN
SALES.TABLEB2
WHERE REPORT_DT = TODAYS_DT
END
ENGINE SQLDBC SET DEFAULT_CONNECTION SALESID
SQL SQLDBC PREPARE SQLOUT FOR SELECT STOREID, SUM(AMT) AS AMOUNT
FROM SALES.TABLEC1
LEFT JOIN
SALES.TABLEC2
WHERE REPORT_DT = TODAYS_DT
PROCEDURE 2ENGINE SQLDBC SET DEFAULT_CONNECTION SALESID
SQL SQLDBC PREPARE SQLOUT FOR SELECT STOREID, SUM(AMT) AS AMOUNT
FROM SALES.TABLEA1
LEFT JOIN
SALES.TABLEA2
WHERE REPORT_DT = TODAYS_DT
END
SQL SQLDBC PREPARE SQLOUT FOR SELECT STOREID, SUM(AMT) AS AMOUNT
FROM SALES.TABLEB1
LEFT JOIN
SALES.TABLEB2
WHERE REPORT_DT = TODAYS_DT
END
SQL SQLDBC PREPARE SQLOUT FOR SELECT STOREID, SUM(AMT) AS AMOUNT
FROM SALES.TABLEC1
LEFT JOIN
SALES.TABLEC2
WHERE REPORT_DT = TODAYS_DT
END
My question is do I have to repeat "
ENGINE SQLDBC SET DEFAULT_CONNECTION SALESID" line in each of the passthru codes?
WebFOCUS 7.7.02
Windows/SQL/CUBES
HTML/PDF/XLS