![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
So, the max length of VARCHAR2 is 4000 bytes. *So, in PL/SQL, if you need to declare a variable longer than 4000, what can you use? *We need to declare a variable and continue to concatenate strings onto it and it becomes longer than 4000 bytes, so, we're SOL? Still looking for the answer on other sites. |
#4
| |||
| |||
|
|
On Dec 9, 10:24*am, The Magnet <a... (AT) unsu (DOT) com> wrote: So, the max length of VARCHAR2 is 4000 bytes. *So, in PL/SQL, if you need to declare a variable longer than 4000, what can you use? *We need to declare a variable and continue to concatenate strings onto it and it becomes longer than 4000 bytes, so, we're SOL? Still looking for the answer on other sites. Of course I should have said more: *What we need to do is put together a dynamic query and open up a cursor: v_select := 'blah blah blah....' open p_data for v_select; v_select is longer than 4000 bytes. |
#5
| |||
| |||
|
|
On Dec 9, 8:30*am, The Magnet <a... (AT) unsu (DOT) com> wrote: On Dec 9, 10:24*am, The Magnet <a... (AT) unsu (DOT) com> wrote: So, the max length of VARCHAR2 is 4000 bytes. *So, in PL/SQL, if you need to declare a variable longer than 4000, what can you use? *We need to declare a variable and continue to concatenate strings onto it and it becomes longer than 4000 bytes, so, we're SOL? Still looking for the answer on other sites. Of course I should have said more: *What we need to do is put together a dynamic query and open up a cursor: v_select := 'blah blah blah....' open p_data for v_select; v_select is longer than 4000 bytes. Wellll...http://awads.net/wp/2007/05/31/did-y...sql-variables/ Sounds like a job for a Character Large OBject. http://download.oracle.com/docs/cd/B.../b14249/adlob_... And poke around in asktom. *Looks like what you want to do (cursor +clob) is limited to 11g:http://asktom.oracle.com/pls/asktom/..._QUESTION_ID:4... Remember, a lot of these things are version dependent, so be real specific about your environment. *Those of us drowning in the stream of consciousness may not remember even if you just told us. jg -- @home.com is bogus.http://www.signonsandiego.com/news/2...-sites-trick-s... |
#6
| |||
| |||
|
|
On Dec 9, 10:50?am, joel garry <joel-ga... (AT) home (DOT) com> wrote: On Dec 9, 8:30?am, The Magnet <a... (AT) unsu (DOT) com> wrote: On Dec 9, 10:24?am, The Magnet <a... (AT) unsu (DOT) com> wrote: So, the max length of VARCHAR2 is 4000 bytes. ?So, in PL/SQL, if you need to declare a variable longer than 4000, what can you use? ?We need to declare a variable and continue to concatenate strings onto it and it becomes longer than 4000 bytes, so, we're SOL? Still looking for the answer on other sites. Of course I should have said more: ?What we need to do is put together a dynamic query and open up a cursor: v_select := 'blah blah blah....' open p_data for v_select; v_select is longer than 4000 bytes. Wellll...http://awads.net/wp/2007/05/31/did-y...sql-variables/ Sounds like a job for a Character Large OBject. http://download.oracle.com/docs/cd/B.../b14249/adlob_... And poke around in asktom. ?Looks like what you want to do (cursor +clob) is limited to 11g:http://asktom.oracle.com/pls/asktom/..._QUESTION_ID:4... Remember, a lot of these things are version dependent, so be real specific about your environment. ?Those of us drowning in the stream of consciousness may not remember even if you just told us. jg -- @home.com is bogus.http://www.signonsandiego.com/news/2...-sites-trick-s... My total bad, we're running Oracle 10g R2. But I'll take a look at the docs. Thanks for the references. |
#7
| |||
| |||
|
|
On Dec 9, 10:24Â*am, The Magnet <a... (AT) unsu (DOT) com> wrote: So, the max length of VARCHAR2 is 4000 bytes. Â*So, in PL/SQL, if you need to declare a variable longer than 4000, what can you use? Â*We need to declare a variable and continue to concatenate strings onto it and it becomes longer than 4000 bytes, so, we're SOL? Still looking for the answer on other sites. Of course I should have said more: What we need to do is put together a dynamic query and open up a cursor: v_select := 'blah blah blah....' open p_data for v_select; v_select is longer than 4000 bytes. |
#8
| |||
| |||
|
|
The Magnet (a... (AT) unsu (DOT) com) wrote: : So, the max length of VARCHAR2 is 4000 bytes. *So, in PL/SQL, if you : need to declare a variable longer than 4000, what can you use? *We : need to declare a variable and continue to concatenate strings onto it : and it becomes longer than 4000 bytes, so, we're SOL? : Still looking for the answer on other sites. In PL/SQL max length of VARCHAR2 is much longer than in SQL. |
#9
| |||
| |||
|
|
The Magnet <art (AT) unsu (DOT) com> writes: On Dec 9, 10:24?am, The Magnet <a... (AT) unsu (DOT) com> wrote: So, the max length of VARCHAR2 is 4000 bytes. ?So, in PL/SQL, if you need to declare a variable longer than 4000, what can you use? ?We need to declare a variable and continue to concatenate strings onto it and it becomes longer than 4000 bytes, so, we're SOL? Still looking for the answer on other sites. Of course I should have said more: What we need to do is put together a dynamic query and open up a cursor: v_select := 'blah blah blah....' open p_data for v_select; v_select is longer than 4000 bytes. limit of varchar2 is 4k for database columns limit of varchar2 for pl/sql is 32k Note that I also think dynamic sql is limited to 32k unless you use the dbms_sql package (but verify this against the Oracle version your using as I could be wrong). |
![]() |
| Thread Tools | |
| Display Modes | |
| |