Current Job: Make Reports containing data from our databases.
Problem: While Oracle comes with sophisticated procedural language of its own (the PL), my shop usually has to run SQL within software where the PL is not supported. As a result, my experience with PL is near zero.
Wondering: I am wondering if a very simple portion of the procedural language support in Oracle can be used in our situation. Specifically, can we setup variables in SQL for use in filters implemented as where clauses.
Reporting Architecture - The people who need the reports receive them as scheduled reports in email, either as Excel or a PDF. The reports are scheduled and emailed by SAP Business Objects. Our ways of using Business Objects does not support much if any PL, confinging us to SQL.
My QUESTION
How can variables be declared in Oracle for use as values in WHERE CLAUSES?
Pseudo Code Illustration
varName = “Mother Mary”
select firstname, lastname, other_fields, etc
from guestlist
where guestname= ".$varName