Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

when is max(varchar2) 4k, when 32k?

Status
Not open for further replies.

kthompsn

Programmer
Feb 28, 2002
18
0
0
US
In FORMS, in a procedure, we are building an IN clause for a SELECT in a variable by concatenating numeric values.
DECLARE
v_str varchar2(32760);
.
.
IF v_str IS NOT NULL
THEN
v_str := v_str || ', ' || i_stars_no;
ELSE
v_str := i_stars_no; /* first time */
END IF;

We are getting an ORA-6502 error in the course of building the string. By observing the execution using FORMS DEBUGGER, we noticed that the process ran farther when we specified TO_CHAR(i_stars_no), and changed the ', ' to ','. Haven't put a LENGTH(v_str) in yet, but it looks to be stopping at about 4K, even tho the variable v_str was defined as 32K.
What are we missing, please?

K Thompson
St Louis, MO

 
Beg pardon -- forgot specifics. Forms 6i, on Oracle 8i database.

tke
 
Cancel above query. Turns out we were running afoul of the 1000 item limit in an &quot;IN&quot; clause. Set up a counter to break &quot;IN&quot; range into smaller (<=1000) element segments.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top