Re: Change the prompt in SQL*PLUS

From: Bruno Thomas <bruno.nospam_at_teaser.fr>
Date: Fri, 11 Jun 1999 10:02:26 +0200
Message-ID: <7jqfqn$7m0$1_at_feed.teaser.fr>


[Quoted] <agi_at_mail.taicom.com.tw> a écrit dans le message : 7jprqd$3hc$1_at_nnrp1.deja.com...
> Hi, theres ,
> I have two problems:
> 1.How do I write a script to change the prompt in SQL*PLUS like
> follows :
>
> sessionid,ser#_at_dbname> instead of just SQL>
>

Here a script to have username_at_global_name :

[Quoted] set termout off
set pause off
define new_prompt='nolog'
column value new_value new_prompt
select username || '_at_' || global_name value from user_users, global_name; set sqlprompt "&new_prompt> "
set termout on

you have only to adapt the query to obtain serial# and sessionid.

>
> 2.How can I run a sql script (lets say xxx.sql) without the
> old ....new two lines
>
> SQL> _at_xxx cust
> old 2: where table_Name = UPPER('&1')
> new 2: where table_Name = UPPER('cust')
>
> Just see the query result.

SHOW[MODE] {OFF|ON} Controls whether SQL*Plus lists the old and new settings of a SQL*Plus system variable when you change the setting with SET. ON lists the settings; [Quoted] OFF suppresses the listing. SHOWMODE ON has the same behavior as the obsolete SHOWMODE BOTH.

> Rgds,
> Agi Chen

Hope this help...

--
Bruno Thomas
bruno.nospam_at_teaser.fr est ma véritable adresse
bruno.nospam_at_teaser.fr is my real address
Received on Fri Jun 11 1999 - 10:02:26 CEST

Original text of this message