Home » SQL & PL/SQL » SQL & PL/SQL » LONG DATA TYPE
LONG DATA TYPE [message #362395] Tue, 02 December 2008 03:30 Go to next message
cziera
Messages: 11
Registered: September 2008
Location: Dasmariñas Cavite
Junior Member


Hello guyz!
Good day!
Please help me out.
I have a table where one of the column has a data type of LONG.
I need to transfer the data of this column into a another column of the same table whereas the data type of the column to be inserted is a VARCHAR.

------------
this will be the layout for example
------------
id_no NUMBER
text LONG
text01 VARCHAR
text02 VARCHAR
text03 VARCHAR
text04 VARCHAR
text05 VARCHAR
-------

In this example, I need to transfer the data of 'text' column to 'text01 to text05' concatenated.

Can anyone help me out?
Thank you in advance!


Re: LONG DATA TYPE [message #362397 is a reply to message #362395] Tue, 02 December 2008 03:37 Go to previous messageGo to next message
mamalik
Messages: 266
Registered: November 2008
Location: Pakistan
Senior Member

Unable to understand your question
Re: LONG DATA TYPE [message #362399 is a reply to message #362395] Tue, 02 December 2008 03:41 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
1/ Don't post your title in UPPER case

2/ Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter) and align the columns in result.
Use the "Preview Message" button to verify.

3/ Always post your Oracle version (4 decimals).

4/ Don't use LONG, use CLOB

5/ Either create a new table with CLOB and use SUBSTR or use PL/SQL (if LONG is less that 32K) or any other language to split the LONG value

Regards
Michel



Regards
Michel
Re: Long Data Type [message #362409 is a reply to message #362399] Tue, 02 December 2008 03:54 Go to previous messageGo to next message
cziera
Messages: 11
Registered: September 2008
Location: Dasmariñas Cavite
Junior Member

Hello, sorry for that

Can you help me or have sample code
as my reference how to transfer the data (from the column of LONG to column of VARCHAR)

Thanks...
Re: Long data Type [message #362411 is a reply to message #362399] Tue, 02 December 2008 03:56 Go to previous messageGo to next message
cziera
Messages: 11
Registered: September 2008
Location: Dasmariñas Cavite
Junior Member

The version I'm using is Oracle 6.0
Thanks..
Re: Long data Type [message #362418 is a reply to message #362411] Tue, 02 December 2008 04:09 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
6.0!
I think you can't do anything with that.
I bet you have not the PL/SQL option.
I bet you have no OS that you can use to develop an application for this version.

Regards
Michel
Re: Long data Type [message #362445 is a reply to message #362411] Tue, 02 December 2008 05:51 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Do you mean you are using Oracle 6.0 as a database, or Oracle Forms 6.0 as a front end?
Re: Long data Type [message #362493 is a reply to message #362411] Tue, 02 December 2008 07:48 Go to previous messageGo to next message
joy_division
Messages: 4644
Registered: February 2005
Location: East Coast USA
Senior Member
Was there even VARCHAR in Oracle 6.0?
Re: Long data Type [message #362497 is a reply to message #362493] Tue, 02 December 2008 08:18 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Yes there was, VARCHAR2 was introduced in 7.0.

Regards
Michel
Re: Long data Type [message #362533 is a reply to message #362497] Tue, 02 December 2008 19:35 Go to previous messageGo to next message
cziera
Messages: 11
Registered: September 2008
Location: Dasmariñas Cavite
Junior Member

Sorry,
Oracle 10g is the version
Re: Long data Type [message #362567 is a reply to message #362533] Wed, 03 December 2008 00:59 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
5/ Either create a new table with CLOB and use SUBSTR or use PL/SQL (if LONG is less that 32K) or any other language to split the LONG value

Regards
Michel
Re: Long data Type [message #362578 is a reply to message #362567] Wed, 03 December 2008 01:37 Go to previous messageGo to next message
cziera
Messages: 11
Registered: September 2008
Location: Dasmariñas Cavite
Junior Member

Thanks...

[Updated on: Wed, 03 December 2008 01:52]

Report message to a moderator

Re: Long data Type [message #362581 is a reply to message #362578] Wed, 03 December 2008 01:45 Go to previous message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I think my answer is quite clear.
You can do it in PL/SQL ONLY if data is less than 32K otherwise you have to do it in another language.

Regards
Michel
Previous Topic: How to load the flat files data to database?
Next Topic: How to read the blob column and write into file? (merged)
Goto Forum:
  


Current Time: Sat Dec 10 18:30:29 CST 2016

Total time taken to generate the page: 0.06806 seconds