Hallo,
I would need a specified part of a result. I wrote the following dbproc, but it dous not work, and I do not know, how I could solve my problem.
CREATE DBPROC CEG_KH_LIST (
IN CID Integer,
IN ORD Varchar(30),
IN SORT Integer,
IN SROW Integer,
IN EROW Integer
)
RETURNS CURSOR AS
$CURSOR = 'LIST_RES';
DECLARE :$CURSOR CURSOR FOR
SELECT * FROM (
SELECT ROWNO AS RN,*
FROM DBA.table1 AS A, DBA.table2 AS B
WHERE A.CID = :CID AND A.ID = B.AID(+)
ORDER BY :ORD )
WHERE RN >= :SROW AND RN < :EROW;It should list the result from the row SROW to EROW. The order is also important.
The first problem width this proc is that the ORDER BY clause is on wrong place, MaxDB said. The other, the value of ROWNO is correct only where the join is succeded, it is 0 elsewhere.
I hope you understand my problem.
Thanks,
Norbert
-- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
