Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Re: sqlplus setting
>> 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
As the mighty mighty Sybrand would say.. hth :)
![]() |
![]() |