Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Re: sqlplus setting

Re: Re: sqlplus setting

From: Adam Moore <adam_at_foo.sweet.as>
Date: 29 Mar 2001 23:29:07 GMT
Message-ID: <slrn9c7he5.sgg.adam@foo.sweet.as>

>> select 'set sqlprompt '''| |substr(global_name,1,6)| |'-'| |user| '> '''
>> from global_name;
>> spool off

Ask Ockham about his razor sometime. Sql that spool-create-runs more sql is very rarely the least complicated way to get somewhere.

Try the following:

  SET termout off
  DEFINE new_prompt = 'nolog'
  COLUMN value new_value new_prompt
  SELECT LOWER(user) || '@' ||

         LOWER(SUBSTR(global_name, 1, INSTR(global_name, '.') - 1)) ||
         CHR(10)
         value

  FROM global_name;
  SET sqlprompt "&new_prompt> "
  SET termout on

As the mighty mighty Sybrand would say.. hth :)

Received on Thu Mar 29 2001 - 17:29:07 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US