Can I use parameters in views to be called in Discoverer [message #621844] |
Tue, 19 August 2014 02:04  |
 |
kupstar
Messages: 16 Registered: November 2013 Location: PNG
|
Junior Member |
|
|
Hi experts,
How can I pass a parameter in a oracle view so these parameters can be passed during running a Discoverer report? Below is a SQL statement which I would like to use to create the view where date1 and date2 would be my parameters: Please advise if there is a workaround.
SELECT s.employee#,
paypoint,
s.award,
REPLACE (street_address, ',') AS Street_address,
e.first_name,
e.surname,
pt.nr_dependants AS Dependents
FROM substantive s, employee e, peemptax pt
WHERE s.employee# = e.employee#
AND e.employee# = pt.employee#
AND pt.end_date IS NULL
AND commence_date =
(SELECT MAX (commence_date)
FROM substantive
WHERE employee# = s.employee#
AND commence_date between to_date(date1,'dd-mon-rrrr') and to_date(date2,'dd-mon-rrrr')))
*BlackSwan added {code} tags. http://www.orafaq.com/forum/t/174502/
Please do so yourself in the future.
[Updated on: Tue, 19 August 2014 21:04] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|