-
Hi all,
See the following two queries.
select transaction_id||' '||control_no||' '||sysdate from coa_shipment_log where rownum<10
I got result as
TRANSACTION_ID||''||CONTROL_NO||''||SYSDATE
--------------------------------------------------------------------------------
1 6598537 29-MAY-02
2 6598538 29-MAY-02
3 6598539 29-MAY-02
4 6598540 29-MAY-02
5 6598541 29-MAY-02
6 6598542 29-MAY-02
7 6598543 29-MAY-02
8 6598544 29-MAY-02
9 6598545 29-MAY-02
Then my users wanted '# some string' followed by the row
So, I changed the query as
select '#Some string '||chr(10)||transaction_id||' '||control_no||' '||sysdate from coa_shipment_log where rownum<10
Now I get
'#1234'||CHR(10)||TRANSACTION_ID||''||CONTROL_NO||''||SYSDATE
--------------------------------------------------------------------------------
#1234
1 6598537 29-MAY-02
#1234
2 6598538 29-MAY-02
#1234
3 6598539 29-MAY-02
#1234
4 6598540 29-MAY-02
'#1234'||CHR(10)||TRANSACTION_ID||''||CONTROL_NO||''||SYSDATE
--------------------------------------------------------------------------------
#1234
5 6598541 29-MAY-02
#1234
6 6598542 29-MAY-02
#1234
7 6598543 29-MAY-02
#1234
'#1234'||CHR(10)||TRANSACTION_ID||''||CONTROL_NO||''||SYSDATE
--------------------------------------------------------------------------------
8 6598544 29-MAY-02
#1234
9 6598545 29-MAY-02
Now, I don't want the extra empty line inbetween the rows.. Is there a way to suppress those??
Thanks in advance..
MS Reddy
-
SQL> set recsep off
SQL> select 'abc --'||chr(10)||'--'||username from all_users;
'ABC--'||CHR(10)||'--'||USERNAME
---------------------------------------
abc --
--SYS
abc --
--SYSTEM
abc --
--TRACESVR
-
Shestakov,
Thanks a million..
MS Reddy
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|