Dynamic query templates for pl sql (oracle)