September 23, 2005 at 3:49 am
Hi All
I would like to know how I can handle rownum functionality in sql server
SELECT *
FROM cash_accounting_periods
WHERE cash_accp_company_id=company.cash_accp_company_id
AND cash_accp_id >= (SELECT DISTINCT cash_accp_id FROM cash_accounting_periods where trunc(sysdate) between trunc(cash_accp_start_date) and trunc(cash_accp_end_date))
AND cash_accp_id <= (SELECT MAX(cash_accp_id) FROM (SELECT DISTINCT cash_accp_id FROM cash_accounting_periods WHERE cash_accp_id >= (SELECT DISTINCT cash_accp_id FROM cash_accounting_periods WHERE TRUNC(SYSDATE) BETWEEN TRUNC(cash_accp_start_date) AND TRUNC(cash_accp_end_date)) ORDER BY cash_accp_id) WHERE ROWNUM <= v_no_of_acc_periods)
ORDER BY cash_accp_id
How can i write the same query in sql server as it does not support rownum
concept Assist me fast
Thanks
September 23, 2005 at 5:00 am
The normal answer is that the application is supposed to handle such a request as it is only a presentation issue. But I'm gonna ask you why you need to do this?
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply