dbTalk Databases Forums  

Huge Query

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Huge Query in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
CenturionX
 
Posts: n/a

Default Huge Query - 10-02-2008 , 07:53 AM






Hello everybody,

I created a package to build a query. This query has a bui dynamic
quantity os calculated fields and it overflows a simple VARCHAR2(4000)
so i'm using a CLOB.
My question is: How can i execute this query referencing the variable
Is there something like EXECUTE vQuery inside a procedure or package.

Thanks.

Reply With Quote
  #2  
Old   
Ed Prochak
 
Posts: n/a

Default Re: Huge Query - 10-02-2008 , 12:30 PM






On Oct 2, 7:53*am, CenturionX <darwinbaldr... (AT) gmail (DOT) com> wrote:
Quote:
Hello everybody,

I created a package to build a query. *This query has a bui dynamic
quantity os calculated fields and it overflows a simple VARCHAR2(4000)
so i'm using a CLOB.
My question is: How can i execute this query referencing the variable
Is there something like EXECUTE vQuery inside a procedure or package.

Thanks.
I'd seriously question the logic of a query that cannot fit into a
VARCHAR2.

You might just have to spool it to a file and run it from a client
(SQL*Plus) session.

Even then, will it work? Other than a
SELECT... WHERE ... somecolumn IN ([4k list of values]) ...
I cannot think of how to write a query to test the 4K limit.


Reply With Quote
  #3  
Old   
Ed Prochak
 
Posts: n/a

Default Re: Huge Query - 10-02-2008 , 12:30 PM



On Oct 2, 7:53*am, CenturionX <darwinbaldr... (AT) gmail (DOT) com> wrote:
Quote:
Hello everybody,

I created a package to build a query. *This query has a bui dynamic
quantity os calculated fields and it overflows a simple VARCHAR2(4000)
so i'm using a CLOB.
My question is: How can i execute this query referencing the variable
Is there something like EXECUTE vQuery inside a procedure or package.

Thanks.
I'd seriously question the logic of a query that cannot fit into a
VARCHAR2.

You might just have to spool it to a file and run it from a client
(SQL*Plus) session.

Even then, will it work? Other than a
SELECT... WHERE ... somecolumn IN ([4k list of values]) ...
I cannot think of how to write a query to test the 4K limit.


Reply With Quote
  #4  
Old   
Ed Prochak
 
Posts: n/a

Default Re: Huge Query - 10-02-2008 , 12:30 PM



On Oct 2, 7:53*am, CenturionX <darwinbaldr... (AT) gmail (DOT) com> wrote:
Quote:
Hello everybody,

I created a package to build a query. *This query has a bui dynamic
quantity os calculated fields and it overflows a simple VARCHAR2(4000)
so i'm using a CLOB.
My question is: How can i execute this query referencing the variable
Is there something like EXECUTE vQuery inside a procedure or package.

Thanks.
I'd seriously question the logic of a query that cannot fit into a
VARCHAR2.

You might just have to spool it to a file and run it from a client
(SQL*Plus) session.

Even then, will it work? Other than a
SELECT... WHERE ... somecolumn IN ([4k list of values]) ...
I cannot think of how to write a query to test the 4K limit.


Reply With Quote
  #5  
Old   
Ed Prochak
 
Posts: n/a

Default Re: Huge Query - 10-02-2008 , 12:30 PM



On Oct 2, 7:53*am, CenturionX <darwinbaldr... (AT) gmail (DOT) com> wrote:
Quote:
Hello everybody,

I created a package to build a query. *This query has a bui dynamic
quantity os calculated fields and it overflows a simple VARCHAR2(4000)
so i'm using a CLOB.
My question is: How can i execute this query referencing the variable
Is there something like EXECUTE vQuery inside a procedure or package.

Thanks.
I'd seriously question the logic of a query that cannot fit into a
VARCHAR2.

You might just have to spool it to a file and run it from a client
(SQL*Plus) session.

Even then, will it work? Other than a
SELECT... WHERE ... somecolumn IN ([4k list of values]) ...
I cannot think of how to write a query to test the 4K limit.


Reply With Quote
  #6  
Old   
joel garry
 
Posts: n/a

Default Re: Huge Query - 10-02-2008 , 04:13 PM



On Oct 2, 10:30*am, Ed Prochak <edproc... (AT) gmail (DOT) com> wrote:
Quote:
On Oct 2, 7:53*am, CenturionX <darwinbaldr... (AT) gmail (DOT) com> wrote:

Hello everybody,

I created a package to build a query. *This query has a bui dynamic
quantity os calculated fields and it overflows a simple VARCHAR2(4000)
so i'm using a CLOB.
My question is: How can i execute this query referencing the variable
Is there something like EXECUTE vQuery inside a procedure or package.

Thanks.

I'd seriously question the logic of a query that cannot fit into a
VARCHAR2.

You might just have to spool it to a file and run it from a client
(SQL*Plus) session.

Even then, will it work? *Other than a
* * SELECT... WHERE ... somecolumn IN ([4k list of values]) ...
I cannot think of how to write a query to test the 4K limit.
Some limits are stated in
http://download.oracle.com/docs/cd/B...009.htm#i13240

You could perhaps write a shell script to append a 1000 'aa',- lines
to a select, then add from dual...

jg
--
@home.com
Da plane, boss, they found da plane!


Reply With Quote
  #7  
Old   
joel garry
 
Posts: n/a

Default Re: Huge Query - 10-02-2008 , 04:13 PM



On Oct 2, 10:30*am, Ed Prochak <edproc... (AT) gmail (DOT) com> wrote:
Quote:
On Oct 2, 7:53*am, CenturionX <darwinbaldr... (AT) gmail (DOT) com> wrote:

Hello everybody,

I created a package to build a query. *This query has a bui dynamic
quantity os calculated fields and it overflows a simple VARCHAR2(4000)
so i'm using a CLOB.
My question is: How can i execute this query referencing the variable
Is there something like EXECUTE vQuery inside a procedure or package.

Thanks.

I'd seriously question the logic of a query that cannot fit into a
VARCHAR2.

You might just have to spool it to a file and run it from a client
(SQL*Plus) session.

Even then, will it work? *Other than a
* * SELECT... WHERE ... somecolumn IN ([4k list of values]) ...
I cannot think of how to write a query to test the 4K limit.
Some limits are stated in
http://download.oracle.com/docs/cd/B...009.htm#i13240

You could perhaps write a shell script to append a 1000 'aa',- lines
to a select, then add from dual...

jg
--
@home.com
Da plane, boss, they found da plane!


Reply With Quote
  #8  
Old   
joel garry
 
Posts: n/a

Default Re: Huge Query - 10-02-2008 , 04:13 PM



On Oct 2, 10:30*am, Ed Prochak <edproc... (AT) gmail (DOT) com> wrote:
Quote:
On Oct 2, 7:53*am, CenturionX <darwinbaldr... (AT) gmail (DOT) com> wrote:

Hello everybody,

I created a package to build a query. *This query has a bui dynamic
quantity os calculated fields and it overflows a simple VARCHAR2(4000)
so i'm using a CLOB.
My question is: How can i execute this query referencing the variable
Is there something like EXECUTE vQuery inside a procedure or package.

Thanks.

I'd seriously question the logic of a query that cannot fit into a
VARCHAR2.

You might just have to spool it to a file and run it from a client
(SQL*Plus) session.

Even then, will it work? *Other than a
* * SELECT... WHERE ... somecolumn IN ([4k list of values]) ...
I cannot think of how to write a query to test the 4K limit.
Some limits are stated in
http://download.oracle.com/docs/cd/B...009.htm#i13240

You could perhaps write a shell script to append a 1000 'aa',- lines
to a select, then add from dual...

jg
--
@home.com
Da plane, boss, they found da plane!


Reply With Quote
  #9  
Old   
joel garry
 
Posts: n/a

Default Re: Huge Query - 10-02-2008 , 04:13 PM



On Oct 2, 10:30*am, Ed Prochak <edproc... (AT) gmail (DOT) com> wrote:
Quote:
On Oct 2, 7:53*am, CenturionX <darwinbaldr... (AT) gmail (DOT) com> wrote:

Hello everybody,

I created a package to build a query. *This query has a bui dynamic
quantity os calculated fields and it overflows a simple VARCHAR2(4000)
so i'm using a CLOB.
My question is: How can i execute this query referencing the variable
Is there something like EXECUTE vQuery inside a procedure or package.

Thanks.

I'd seriously question the logic of a query that cannot fit into a
VARCHAR2.

You might just have to spool it to a file and run it from a client
(SQL*Plus) session.

Even then, will it work? *Other than a
* * SELECT... WHERE ... somecolumn IN ([4k list of values]) ...
I cannot think of how to write a query to test the 4K limit.
Some limits are stated in
http://download.oracle.com/docs/cd/B...009.htm#i13240

You could perhaps write a shell script to append a 1000 'aa',- lines
to a select, then add from dual...

jg
--
@home.com
Da plane, boss, they found da plane!


Reply With Quote
  #10  
Old   
DA Morgan
 
Posts: n/a

Default Re: Huge Query - 10-02-2008 , 05:27 PM



Ed Prochak wrote:
Quote:
On Oct 2, 7:53 am, CenturionX <darwinbaldr... (AT) gmail (DOT) com> wrote:
Hello everybody,

I created a package to build a query. This query has a bui dynamic
quantity os calculated fields and it overflows a simple VARCHAR2(4000)
so i'm using a CLOB.
My question is: How can i execute this query referencing the variable
Is there something like EXECUTE vQuery inside a procedure or package.

Thanks.

I'd seriously question the logic of a query that cannot fit into a
VARCHAR2.

I would too but the answer, in Oracle, is that you can build a query
of 8TB size if you wish using DBMS_SQL.

Go to Morgan's Library at www.psoug.org
Look up the DBMS_SQL package
Scroll down to "EXECUTE_PLSQL_BLOCK"
---------------
Daniel Morgan
Oracle Ace Director
University of Washington


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.