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_at_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) || '_at_' ||
         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 :)

  • adm
Received on Fri Mar 30 2001 - 01:29:07 CEST

Original text of this message