By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,586 Members | 2,418 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,586 IT Pros & Developers. It's quick & easy.

sql code = -804 query too long

P: 4
Hi ,

My embedded sql query in my program retrieves huge amount of data . Hence the DB2 throws up a error message when queried to retrieve this huge data .
My query do contains joins and a number of where conditions as well .
Please let me know how to resolve this problem . Is there a keyword to extend db2 limiter which will resolve it .
Please let me know the solution ASAP .

Thanks
Rakesh
Mar 4 '07 #1
Share this Question
Share on Google+
4 Replies


P: 10
Hi ,

My embedded sql query in my program retrieves huge amount of data . Hence the DB2 throws up a error message when queried to retrieve this huge data .
My query do contains joins and a number of where conditions as well .
Please let me know how to resolve this problem . Is there a keyword to extend db2 limiter which will resolve it .
Please let me know the solution ASAP .

Thanks
Rakesh
Hi,

I dont think this is problem with query too long. SQL804N is saying that your Host varaiables are invalid or you have modifed the output of precompilation. Verify your host variables.
Mar 5 '07 #2

P: 4
Hi,

I dont think this is problem with query too long. SQL804N is saying that your Host varaiables are invalid or you have modifed the output of precompilation. Verify your host variables.
Hi Ramesh ,

Thanks for your instant response , the problem what i am getting is in my sas program "DB2 SQL Error, sqlca->sqlcode=-804
ERROR: DB2 statement is too long."
Please help me in getting the problem resolved in this scenario .

Thanks
Rakesh
Mar 14 '07 #3

bartonc
Expert 5K+
P: 6,596
Hi Ramesh ,

Thanks for your instant response , the problem what i am getting is in my sas program "DB2 SQL Error, sqlca->sqlcode=-804
ERROR: DB2 statement is too long."
Please help me in getting the problem resolved in this scenario .

Thanks
Rakesh
Of course, it will help if you post the query here.
Mar 16 '07 #4

P: 4
Thanks for ur response .
I m prviding you with pseudo query :

select a.userid , a.uernm , c.group , b.servernm , b.domain
from dept a ,
database b ,
faciilty c
where a.usernm = b.servernm
and c.group=b.domain

if &group is not eq ' '
then c.group in (&group)
/* Hi ramesh the problem we do face is when the above query is resolved lots of data gets resolved from the sas macro &group , probably this may cause my query to abend or because of type of data in the macro when resolved . This i m saying because when i retrieved much lesser data i faced the same proble say from 1000 groups to 400 groups then also i face this problem . So these r my options i think r the cause of this problem .
Hence let me know ur comments on it n its solution as well .
Looking from u an instant response . */

Thanks
Mar 18 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.