RE: LONG to char

2001-02-22 Thread Gunawan Yuwono

Try use PL/SQL Block with DBMS_OUTPUT:

SET SERVEROUTPUT ON SIZE 10
DECLARE
   CURSOR c_cursor IS
   SELECT long_type_column, varchar2_type_column FROM tab1;

BEGIN
   FOR c_row IN c_cursor LOOP
  DBMS_OUTPUT.PUT_LINE('INSERT INTO TAB2 VALUES (''' ||
 c_row.long_type_column ||
 ''', ''' || c_row.varchar2_type_column || ''');');
   END LOOP;
END;
/

Just curious, cannot you use EXP/IMP utilities or COPY command for what you are
trying to accomplish?

HTP.
Gunawan Yuwono

--- "Johan Locke@i-Commerce Services" <[EMAIL PROTECTED]> wrote:
> Hi
> 
> I'm attemting to write an insert script for a table:
> 
> Spool out.log
> 
> SELECT 'INSERT INTO TAB2 VALUES(''' || LONG_TYPE_COLUMN || ''',''' ||
> VARCHAR2_TYPE_COLUMN||''');'
> FROM   TAB1;
> 
> spool off
> 
> (It moans about Inconsistant Datatypes - which I can understand)
> 
> Any ideas on how to get around this?
> 
> Regards
> JL
> 
> -Original Message-
> Sent: Tuesday, February 20, 2001 5:23 PM
> To: [EMAIL PROTECTED]
> 
> 
> Johan,
> What do you exactly want to do? If you could explain it in more detail, I
> might
> be able to help, at least I'll try.
> 
> 
> --- "Johan Locke@i-Commerce Services" <[EMAIL PROTECTED]> wrote:
> > Anybody have any Idee how to conevrt a LONG datatype to char/varchar
> > 
> > Regards
> > JL
> > -- 
> > Please see the official ORACLE-L FAQ: http://www.orafaq.com
> > -- 
> > Author: Johan Locke@i-Commerce Services
> >   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).
> 
> 
> =
> Gunawan Yuwono
> Oracle DBA
> Kansas City, USA
> 
> __
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35 
> a year!  http://personal.mail.yahoo.com/
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> -- 
> Author: Johan Locke@i-Commerce Services
>   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).


=
Gunawan Yuwono
Oracle DBA
Kansas City, USA

__
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Gunawan Yuwono
  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).



RE: LONG to char

2001-02-20 Thread Johan [EMAIL PROTECTED] Services

Hi

I'm attemting to write an insert script for a table:

Spool out.log

SELECT 'INSERT INTO TAB2 VALUES(''' || LONG_TYPE_COLUMN || ''',''' ||
VARCHAR2_TYPE_COLUMN||''');'
FROM   TAB1;

spool off

(It moans about Inconsistant Datatypes - which I can understand)

Any ideas on how to get around this?

Regards
JL

-Original Message-
Sent: Tuesday, February 20, 2001 5:23 PM
To: [EMAIL PROTECTED]


Johan,
What do you exactly want to do? If you could explain it in more detail, I
might
be able to help, at least I'll try.


--- "Johan Locke@i-Commerce Services" <[EMAIL PROTECTED]> wrote:
> Anybody have any Idee how to conevrt a LONG datatype to char/varchar
> 
> Regards
> JL
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> -- 
> Author: Johan Locke@i-Commerce Services
>   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).


=
Gunawan Yuwono
Oracle DBA
Kansas City, USA

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Johan Locke@i-Commerce Services
  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).



RE: LONG to char

2001-02-20 Thread Adam Turner

I am doing this now.  In a very lame and inneffecient way.  I wrote a cursor
and am taking my LOB into a really long VARCHAR2(1) or whatever variable
then substringing it out into several smaller VARCHAR2(4000) fields.  It
isn't pretty, but it is working without errors 

adam



-Original Message-
Sent: Tuesday, February 20, 2001 8:45 AM
To: Multiple recipients of list ORACLE-L


Anybody have any Idee how to conevrt a LONG datatype to char/varchar

Regards
JL
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Johan Locke@i-Commerce Services
  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: Adam Turner
  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).



LONG to char

2001-02-20 Thread Johan [EMAIL PROTECTED] Services

Anybody have any Idee how to conevrt a LONG datatype to char/varchar

Regards
JL
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Johan Locke@i-Commerce Services
  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).