Forms 10gR1(9.0.4).
The majority of LOVs on my forms are based on record group generated from a select statement that is basically.
SELECT rv_id,
rv_descn
FROM curr_refval
WHERE rv_domain = 'DOMAIN'
I'd like to change them to be
SELECT rv_id,
rv_descn
FROM curr_refval
WHERE rv_domain = :domain
Because bind variables are good and hard parsing is bad.
I'd like to acheive this by using package variables as follows;
I create a package spec with a variable to hold the domain for the record group and then code the record group query as.
SELECT rv_id,
rv_descn
FROM curr_refval
WHERE rv_domain = varaibles_pkg.domain
However the builder complains that the SQL is invalid.
I know I could create a non base table block to hold the variables but I don't like creating items when I can use a packaged variable. They are easier to track and besides control blocks and page 0 items are sooo forms 3.
Any other ideas, oh great and wise ones.