Thanks to those who recommended the relatively new set colsep command. It
did work in this report.
Thanks again,
Cherie Machler
Oracle DBA
Gelco Information Network
[EMAIL PROTECTED]
ardier.com To: Multiple recipients of
list ORACLE-L <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED] cc:
Subject: Re: How to use
pipe-delimited SQL*Plus output with a long
datatype
07/30/02 09:59 AM
Please respond to ORACLE-L
I think the problem is that you can't do an operation (like concatenate) on
a long field.
But another way to get the same output is to set colsep '|' , and then use
plain old select list
chaim
[EMAIL PROTECTED]@fatcity.com on 07/30/2002 09:23:20 AM
Please respond to [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
cc:
One of our developers wants to create a reusable report where the
pipe-delimited output generated by SQL*Plus would be sent off and used as
input into another process. The problem is the remarks field which is of
type long. It causes ORA-00997 errors. If I take the pipe-delimits off,
the report works o.k. If I take the remarks field out, the report works
o.k. There seems to be an incompatibility between the two. The
developer wants to have the remarks column included in the report and she
also wants the fields to be delimited somehow.
I saw an informative document on Metalink about the ORA-997 error but there
is no work-around suggested. Does anyone have any bright ideas? It is
not possible to convert the long within the database, at this time. This
database will be obsolete in a few months so it's not worth the hassle to
recode all of the apps that use this field.
1 select /*+ USE_NL(CCD,CCDX,ERLI,ERH) */ ar.acct_no || '|' ||
2 ar.intl_rep_no || '|' ||
3 ar.rep_id || '|' ||
4 cr.last_name || '|' ||
5 cr.first_name || '|' ||
6 erh.cnfr_no || '|' ||
7 erli.line_item_amt || '|' ||
8 erli.line_item_dt || '|' ||
9 erli.line_seq_no || '|' ||
10 ccd.merch_name || '|' ||
11 erh.remarks
12 from acct_rep ar,
13 client_rep cr,
14 exp_rpt_hdr erh,
15 exp_rpt_line_item erli,
16 chrg_card_dtl_xref ccdx,
17 chrg_card_dtl ccd
18 where '49368' = erh.acct_no
19 and ccd.intl_rep_no = erh.intl_rep_no
20 AND cr.clnt_no = ar.clnt_no
21 AND cr.intl_rep_no = ar.intl_rep_no
22 AND erh.intl_rep_no = cr.intl_rep_no
23 AND erh.acct_no = ar.acct_no
24 AND erh.intl_rep_no = ar.intl_rep_no
25 AND erh.cnfr_no = erli.cnfr_no
26 and trunc(erh.submit_dt) > trunc(sysdate - 25)
27 AND '810' = erli.pay_seq_no
28 AND ccdx.cnfr_no (+) = erli.cnfr_no
29 AND ccdx.line_seq_no (+) = erli.line_seq_no
30 AND ccdx.cnfr_No is null
31 AND ar.acct_no = '49368'
32 AND ccd.acct_no = '49368'
33 AND ccd.trans_dt = erli.line_item_dt
34* AND ccd.posted_amt = erli.line_item_amt
SQL> /
erh.remarks
*
ERROR at line 11:
ORA-00997: illegal use of LONG datatype
Thanks for any advice.
Cherie Machler
Oracle DBA
Gelco Information Network
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).