As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at firstname.lastname@example.org and provide your corporate email address, company, and name.
I would suggest trying with a simple example? For subquery factoring, I was able to run a FOCEXEC using this SQL:
ENGINE SQLORA SET DEFAULT_CONNECTION MYORA
SQL SQLORA PREPARE SQLOUT FOR
with generator as (
rownum <= 4000
/*+ gather_plan_statistics */
/*+ no_merge */
rownum <= 1000
TABLE FILE SQLOUT
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
I do recall a error [(FOC1405) SQL PREPARE ERROR] being thrown using CASE statements that seemed to require them to be wrapped in parentheses as a work-around. For example:
Produces an Error: CASE WHEN…. THEN…. END AS COLUMN
No Error: (CASE WHEN…. THEN…. END) AS COLUMN
Hope this helps...
8.0.02M, Oracle 11.2 (AIX), Windows 2008R2, HTML, PDF, Excel
A Synonym candidate can be any file that contains one (and only one) valid SQL Query and does not contain end-of-statement delimiters (";" or "/") and comments.
A WITH clause preceding the SQL is OK. For example a synonym can be created for this simple query and then used for retrieval:
WITH dept_count AS (
SELECT deptno, COUNT(*) AS dept_count
GROUP BY deptno)
SELECT e.ename AS employee_name,
dc.dept_count AS emp_dept_count
FROM scott.emp e,
WHERE e.deptno = dc.deptno
This simple query works; there is just one SELECT statement and it's last.
This functionality has been enhanced in Release 7.7.05 to support more complex queries.
Posts: 397 | Location: New York City | Registered: May 03, 2007