Extended Templates, how?

Hello together,

I’m working in a new company which use Toad and I’ll try now to configure the environment as I’d like.
I’ve seen the Templates and searched through the internet. Yet I was not able to find a solution for a more extended template.

So whats my problem? I can’t define variable with start/ending and therefore I cannot create a whole Create Table Script (with Cursor, PK, Triggers, Roles etc). Following Example (< > to shown where the variable should have to start and stop)


Prompt TABLE .<TABLE_NAME>;
CREATE TABLE .<TABLE_NAME> (
<TABLE_NAME>_id NUMBER(10) NOT NULL

  • …*
    );

/* Primary Key */
ALTER TABLE .<TABLE_NAME> ADD CONSTRAINT pk_<TABLE_NAME> PRIMARY KEY (<TABLE_NAME>_id);


Following problems occurring

  • The . will get “eaten” by the template engine -> TestA_table instead Test.A_table (&SCHEMA.&TABLE_NAME)
  • I cannot use variables for Generic-Situation: A_test_id, fk_a_test1, ROLE_A_Test**_SQL** => will shown as own variable which can be a bit complicated on a longer template
    I didn’t found yet an example or explanation to solve my issue. I’ve tried the Advanced Option, but it seems I miss something there also. The Only workaround atm would be: Use the <> as “stopper” and after finished template creation remove them with Search/Replace.

Does anybody have an Idea if and how I could create such a template?

Thanks in advance for any idea/suggestion.

Standard SQL*Plus behavior to eat the period – when you want to do a variable and have a period next to it you must double period.

So example: &VARIABLE_FILE_NAME…sql

From: Telaran [mailto:bounce-Telaran@toadworld.com]

Sent: Tuesday, September 03, 2013 3:19 AM

To: toadoracle@toadworld.com

Subject: [Toad for Oracle - Discussion Forum] Extended Templates, how?

Extended Templates, how?

Thread created by Telaran

Hello together,

I’m working in a new company which use Toad and I’ll try now to configure the environment as I’d like.

I’ve seen the Templates and searched through the internet. Yet I was not able to find a solution for a more extended template.

So whats my problem? I can’t define variable with start/ending and therefore I cannot create a whole Create Table Script (with Cursor, PK, Triggers, Roles etc). Following Example (< > to shown
where the variable should have to start and stop)


Prompt TABLE .<TABLE_NAME>;

CREATE TABLE .<TABLE_NAME> (

<TABLE_NAME>_id NUMBER(10) NOT NULL

  • …*

);

/* Primary Key */

ALTER TABLE .<TABLE_NAME> ADD CONSTRAINT pk_<TABLE_NAME> PRIMARY KEY (<TABLE_NAME>_id);


Following problems occurring

  • The . will get “eaten” by the template engine -> TestA_table instead Test.A_table (&SCHEMA.&TABLE_NAME)
  • I cannot use variables for Generic-Situation: A_test_id, fk_a_test1, ROLE_A_Test**_SQL**
    => will shown as own variable which can be a bit complicated on a longer template
    I didn’t found yet an example or explanation to solve my issue. I’ve tried the Advanced Option, but it seems I miss something there also. The Only workaround atm would be: Use the <> as “stopper”
    and after finished template creation remove them with Search/Replace.

Does anybody have an Idea if and how I could create such a template?

Thanks in advance for any idea/suggestion.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.