Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQL Editor Code Templates

crokFeb 22 2014

Hello,

I have a few points related to Code Templates, which are a great feature, but don't quite seem to do everything they could.

1) The built-in template functions like #date# and #time# don't get expanded with completion insight:

  • Given a template id 'cm' and a template value '-- #date# #time#'
  • If I type 'cm' in a worksheet (without the quotes obviously) and invoke completion insight - the output is '-- #date# #time#'
  • If I type 'cm' in a worksheet (without the quotes obviously) and invoke code template from the context menu - the output is '-- 22/02/14 10:51:36'


Is there a way to have completion insight evaluate the functions wrapped in the # tags?


2) Is there a way to nest templates? As a very simple example:

  • Given a template id 'ca' and a template value 'Author : '
  • I would like to be able to write another template id  'cm' and a template value '-- #ca#'', which when invoked would give the output '-- Author : '

3) Is there a way to extend the built-in template functions like #date# and #time#, to reference and evaluate Oracle built-in functions? As an example:

  • Given a template id 'ca' and a template value '-- Author : #sys_context('USEREVNV', 'OS_USER')#'
  • I would like to be able to invoke the template and get the output '-- Author : <current_os_user>'
  • Another example would be 'cd' and a template value '-- Date : #sysdate#'
  • I would like to be able to invoke the template and get the output '-- Date : <the current date formatted to the current NLS settings>'

Although the examples I have given are simple, this is a very powerful feature.

4) Is there a way to provide user input to code templates at invocation time? As an example:

  • Given a template id 'pp' and a template value 'procedure &pname is begin null; end &pname;'
  • I would like to be able to invoke the template and get prompted for an input value for pname.
  • This input should be used to replace all occurrences of &pname in my template value
  • In this example, for an input value of 'my_proc' I would expect the output 'procedure my_proc is begin null; end my_proc;'

Again this is a simple example, but also a very powerful feature.

Comments

KKT

check this out.

Importing a Source File In Hyperion FDM Results In Error: "Data Access Error" and "You do not have permission to use the bulk load statement" (Doc ID 833883.1)

if not successful can you share fdm logs, Tools –> View Error Log

Thanks,

~KKT~

1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 22 2014
Added on Feb 22 2014
0 comments
677 views