Different queries in a program unit template

Pavlo

Member²
Hello,

We are looking for a description of the syntax for your Templates. I know that it is possible to have a query in a template. For example:
[$QUERY tables_and_views =
select UPPER(object_name) from user_objects
where object_type in ('TABLE', 'VIEW')
order by object_type, object_name]
CREATE OR REPLACE TRIGGER [Table or view = $tables_and_views,...]_[Event = INSERT, UPDATE, DELETE, ...][+Extension=_][Extension]
[Event] ON [Table or view]
.
.
.

Is it also possible to have more queries in the same template? If yes, how is the syntax? If not, how is the syntax to get different values from a query? In our case we need also the actual year to set in the Copyright.

 
Last edited:
I've played with your example and two Queries seems to work.

[$QUERY tables_and_views =
select UPPER(object_name) from user_objects
where object_type in ('TABLE', 'VIEW')
order by object_type, object_name]
[$QUERY today =
select to_char(sysdate,'YYYY.MM.DD') from dual]
CREATE OR REPLACE TRIGGER [Table or View = $tables_and_views,...]_[Event = INSERT, UPDATE, DELETE, ...][+Trigger_Name_Extension=_][Trigger_Name_Extension]
[Event] ON [Table or view]

-- Created by Theod [Today = $today]

blablabla

 
Back
Top