SQL*Plus help [message #275191] |
Thu, 18 October 2007 13:42 |
ashwin_tampa
Messages: 40 Registered: October 2005
|
Member |
|
|
Hi guys,
Could someone help on this?
set serverouput on size 1000000
set head off
set echo off
set feedback off
set pagesize 0
set linesize 30000
set trimspool on
col filename1 new_value filename1
SELECT
'&filedestination'||'AHCA_RX_'||TO_CHAR(SYSDATE,'MMDDYYYY')||'_Q'||&quarter_num_like_2_or_3||'.txt' filename1
FROM DUAL;
spool &filename1
select '&abcd' from dual;
spool off
file is saving :
Enter value for abcd: A Thing of beauty is a joy forever!
old 1: select '&abcd' from dual
new 1: select 'A Thing of beauty is a joy forever!' from dual
A Thing of beauty is a joy forever!
I want user input text only.
so file result shoule be only following text :
A Thing of beauty is a joy forever!
[Updated on: Thu, 18 October 2007 13:45] by Moderator Report message to a moderator
|
|
|
|
Re: SQL*Plus help [message #275195 is a reply to message #275192] |
Thu, 18 October 2007 13:58 |
ashwin_tampa
Messages: 40 Registered: October 2005
|
Member |
|
|
Thanks a lot Michel for your prompt reply,
but I am still getting this result in my file :
Enter value for abcd: A thing of beauty is a joy forever!
A thing of beauty is a joy forever!
Here is the code :
set head off
set echo off
set verify off
set showmode off
set feedback off
set pagesize 0
set linesize 30000
set trimspool on
col filename1 new_value filename1
SELECT '&filedestination'||'AHCA_RX_'||TO_CHAR(SYSDATE,'MMDDYYYY')||'_Q'||&quarter_num_like_2_or_3||'.txt' filename1 FROM DUAL;
spool &filename1
select '&abcd' from dual;
spool off
|
|
|
|
|