[eluser]GrootBaas[/eluser]
Pramod,
Yes, Oracle does not have the LIMIT functionality, but I managed to get around that problem.
Try looking at this select ....
Code:
SELECT a.id,
a.account_name,
a.contract_no,
a.reg_no,
a.start_date,
DECODE(a.status, 'R', 'Active', 'A', 'Active', 'C', 'Closed', 'O', 'Open') status
FROM (SELECT row_number() OVER ({ORDER_BY}) id,
ea.account_name,
ea.account_code,
av.con_contract_no contract_no,
av.fms_reg_no reg_no,
av.con_con_id,
av.start_date,
av.con_contract_status status
FROM allocation_view av,
external_accounts ea
WHERE av.cln_ea_c_id = ea.c_id
AND av.cln_ea_account_type = ea.account_type
AND av.cln_ea_account_code = ea.account_code
AND av.fms_reg_no = NVL({REG_NO}, av.fms_reg_no)
ORDER BY ea.account_name) a {SEARCH_STR}