Print Thread
TOracleQuery.RowsProcessed or TOracleDataSet.RecordCount
#8849 11/14/06 06:58 PM
Joined: Nov 2006
Posts: 44
Ukraine
D
Devil Offline OP
Member
OP Offline
Member
D
Joined: Nov 2006
Posts: 44
Ukraine
TOracleQuery.RowsProcessed or TOracleDataSet.RecordCount can't return more than
2147483647 (type Integer).
What do, if to be done to more than 2147483647 records?

Re: TOracleQuery.RowsProcessed or TOracleDataSet.RecordCount
#8850 11/14/06 10:31 PM
Joined: Aug 1999
Posts: 22,204
Member
Offline
Member
Joined: Aug 1999
Posts: 22,204
That won't work, 2147483647 records is the limit. You would have to redesign the query into multiple smaller queries.


Marco Kalter
Allround Automations
Re: TOracleQuery.RowsProcessed or TOracleDataSet.RecordCount
#8851 11/15/06 02:07 PM
Joined: Nov 2006
Posts: 44
Ukraine
D
Devil Offline OP
Member
OP Offline
Member
D
Joined: Nov 2006
Posts: 44
Ukraine
Ok. How to redesign the query?
You mean in where clause for first query
set:
where ...
rownum between 1 and 2147483647
for second query set:
where ...
rownum between 2147483647 and 4294967294 --2147483647+2147483647

of course I'm use bind variables instead of integer values

If used rownum, this is will be guaranteed what queries not return cross records?

Re: TOracleQuery.RowsProcessed or TOracleDataSet.RecordCount
#8852 11/15/06 06:53 PM
Joined: Oct 1999
Posts: 138
Eschborn, Germany
Member
Offline
Member
Joined: Oct 1999
Posts: 138
Eschborn, Germany
That will not work.

where
rownum between 2147483647 and 4294967294

will never return a value.

rownum is a pseudocolumn which always starts with 1 and counts the "RESULT".

If you say rownum > 1 then for the first record the result is false and the record is not returned and then rownum is not increased.

This is an oracle-sql restriction.
Greetings
Jens

Re: TOracleQuery.RowsProcessed or TOracleDataSet.RecordCount
#8853 11/15/06 11:18 PM
Joined: Aug 1999
Posts: 22,204
Member
Offline
Member
Joined: Aug 1999
Posts: 22,204
[quote]Ok. How to redesign the query?[/quote]For example, if this is a join, change it to a master query and a subquery.

Single join with many rows:
Code
select d.dname, e.ename
  from dept d, emp e
 where e.deptno = d.deptno
Master/subquery with fewer rows:
Code
select deptno, dname
  from dept

select ename
  from emp
 where depnto = :v_deptno


Marco Kalter
Allround Automations
Re: TOracleQuery.RowsProcessed or TOracleDataSet.RecordCount
#8854 11/16/06 02:21 PM
Joined: Nov 2006
Posts: 44
Ukraine
D
Devil Offline OP
Member
OP Offline
Member
D
Joined: Nov 2006
Posts: 44
Ukraine
Thanks All


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.117s Queries: 14 (0.030s) Memory: 2.5151 MB (Peak: 3.0380 MB) Data Comp: Off Server Time: 2024-04-26 07:18:48 UTC
Valid HTML 5 and Valid CSS