BJCooperIT
Programmer
I am currently switching back and forth between SQL*Plus sessions of Oracle 8.0.5 and 8.1.7 in two different databases on different servers. I would like my SQL prompt to leave no doubt which session I am working in since one is development and one is production. My sessions use the same LOGIN.SQL. I have added some code to modify my SQL Prompt:
set termout off
define new_prompt='nolog'
column new_prompt new_value new_prompt
select username || ': ' || substr(substr(global_name,1,30),1,
instr(substr(global_name,1,30),'.')-1) new_prompt from user_users, global_name;
set sqlprompt "&new_prompt> "
set termout on
Does anyone know a way to modify this so that I can also reflect the version number in the prompt? View v$version does not seem to be helpful enough to use without some hokey code to get the first row and substring out the version.
Anyone got a better idea? Thanks!
(select * from life where brain is not null)
Consultant/Custom Forms & PL/SQL - Oracle 8.1.7 - Windows 2000
set termout off
define new_prompt='nolog'
column new_prompt new_value new_prompt
select username || ': ' || substr(substr(global_name,1,30),1,
instr(substr(global_name,1,30),'.')-1) new_prompt from user_users, global_name;
set sqlprompt "&new_prompt> "
set termout on
Does anyone know a way to modify this so that I can also reflect the version number in the prompt? View v$version does not seem to be helpful enough to use without some hokey code to get the first row and substring out the version.
Anyone got a better idea? Thanks!
(select * from life where brain is not null)
Consultant/Custom Forms & PL/SQL - Oracle 8.1.7 - Windows 2000