Home All Groups Group Topic Archive Search About

Problem with too many queries.

Author
21 Jan 2006 9:58 AM
Vani Donthula
Hi

I have 3 tables and I have to do search feature with 12 drop downs i.e 12
Parameters.
I have to select 1or2  fields from each tables.
There are almost more than 1000 queries,when I placed these in codebehind of
dot net program it was giving me a CLR ERROR,

Now when I am doing these  queries in stored Procedure  it's taking some 150
queries and for 151 query it's giving error.
--Syntax  Error
---Some part of your SQL statement is nested too deeply. Rewrite the query
or break it up into smaller queries.

BUT THE SYTAX FOR THESE QUERIES  IS SAME AS THE ABOVE 150 QUERIES.

I really will appreciate ur help!!

Author
21 Jan 2006 11:42 AM
Mihaly
Do you placed more than 150 simple queries in the stored procedure and it's
not working?
You can create a temporaly table and insert in it records from the 3 tables
with INSERT SELECT and return the dataset to the end of the storec procedure
with SELECT. The returned date will analized in the client application.
Hope this help you.

Mihaly

Show quote
"Vani Donthula" wrote:

> Hi
>
> I have 3 tables and I have to do search feature with 12 drop downs i.e 12
> Parameters.
> I have to select 1or2  fields from each tables.
> There are almost more than 1000 queries,when I placed these in codebehind of
> dot net program it was giving me a CLR ERROR,
>
> Now when I am doing these  queries in stored Procedure  it's taking some 150
> queries and for 151 query it's giving error.
> --Syntax  Error
> ---Some part of your SQL statement is nested too deeply. Rewrite the query
> or break it up into smaller queries.
>
> BUT THE SYTAX FOR THESE QUERIES  IS SAME AS THE ABOVE 150 QUERIES.
>
> I really will appreciate ur help!!
>
>
>
>
>
Author
21 Jan 2006 12:07 PM
ML
Please post DDL, because right now you're the only one who can solve this
poroblem, since no one else on this planet (I presume) has seen your code.


ML

---
http://milambda.blogspot.com/

AddThis Social Bookmark Button