473,394 Members | 1,697 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Convert Long to Varchar

Hi all,

I have a nice problem. I´m trying to convert a Long to varchar2. It
works when the long field doesn´t contain more than 2000 characters.
How do I solve this?

I´m working with Oracle 7 by the way.

/Fred
Jul 19 '05 #1
1 19462
Fred wrote:
Hi all,

I have a nice problem. I´m trying to convert a Long to varchar2. It
works when the long field doesn´t contain more than 2000 characters.
How do I solve this?

I´m working with Oracle 7 by the way.

/Fred


SQL or PL/SQL?
SQL: try "set long <an arbitrary large value>"
PL/SQL: a varchar variable holds 4k/32k max, so you
are stuck. 32k when you just want to use it, 4k when
you want to interface with it (e.g. store in a table)

--

Regards,
Frank van Bortel

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Lauren Quantrell | last post by:
I have a stored procedure using Convert where the exact same Convert string works in the SELECT portion of the procedure but fails in the WHERE portion. The entire SP is listed below....
4
by: v0lcan0 | last post by:
I’m trying to cast and integer type to a varchar and then concatenate two varchar and ’01’ and convert it into datetime with the following code: CONVERT(datetime, { fn CONCAT({ fn...
7
by: James o'konnor | last post by:
hello. i have the next for create one table into db2 CREATE TABLE "MYSQUEMA"."TABLADEMO" ( "ID" INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY ( START WITH +0 INCREMENT BY +1 MINVALUE +0...
6
by: Richard | last post by:
Hi all, Hope everybody is having an OK monday?!!? Quick question, I have a database in which the dates are stored as longs. I think the original program was VB and the dates were just cast...
2
by: John Smith | last post by:
What is the difference? Is LONG VARCHAR only 28 bytes longer then VARCHAR? Is this the only difference?
1
by: fatmapatlar | last post by:
I have to convert this script, but i didn't. This is stored procedure of sql. I need to convert to postgresql... if it is possible please help me! Thanks Fatma CREATE PROCEDURE...
2
by: kirke | last post by:
Hi, I have a datetime column named dtDateTime. its format is "Oct 27 2006 12:00:00 " I want to group by only date part of it and count my code is $sql1="SELECT ...
6
by: scott ocamb | last post by:
Hello, I have a function that expects the following parms. How can I handle null values. For example, if FirstName comes through as null, how can i propogate that null value to the stored...
1
by: Fred | last post by:
Hi all, I have a nice problem. I´m trying to convert a Long to varchar2. It works when the long field doesn´t contain more than 2000 characters. How do I solve this? I´m working with Oracle 7...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.