Home » Developer & Programmer » Reports & Discoverer » Understanding & Variables in sql for a report
Understanding & Variables in sql for a report [message #234502] Tue, 01 May 2007 16:29 Go to next message
Anne Simms
Messages: 163
Registered: May 2002
Location: San Francisco, CA
Senior Member
I've been away from reports for a while, so I am a little rusty. Can someone explain to me what the below data represnts at the end of a sql statement/query when building an Oracle report and how it relates to the report?


Re: Understanding & Variables in sql for a report [message #234503 is a reply to message #234502] Tue, 01 May 2007 16:37 Go to previous message
Messages: 20849
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It looks like dynamically created WHERE clause. For example, if your query looks like
SELECT deptno, dname
FROM dept
you'd have to find where 'cp_org_where' is created. I presume it has something to do with user parameter(s) and could be defined in the AFTER-PARAMETER-FORM trigger (with possible use of a package/procedure/function).

It might look like this: if parameter's name is 'par_loc', then 'cpc_org_where' might look like
'WHERE loc = ' || :par_loc
which would then evaluate the whole query into
SELECT deptno, dname
FROM dept
WHERE loc = :par_loc
Previous Topic: using a .prt with oralce 10g
Next Topic: Print formula column onto the last page
Goto Forum:

Current Time: Sat Oct 22 11:29:25 CDT 2016

Total time taken to generate the page: 0.29991 seconds