John Pauley wrote:
> All, Any suggestions on a Postgresql equivalent to
> the following DB2 sql query:
>
> SELECT * FROM (SELECT
> ID,NAME,CITY,STATE,PROGRAM,CUST_NAME,CUST_ID,ROWNUMBER()
> OVER (ORDER BY ID ASC) AS RN FROM
> MERCHANT_BROWSER_VIEW WHERE CUST_ID = 'A51B8CA2' ) AS
> RESULT WHERE RN BETWEEN 1 AND 20
>
I'm not familiar with DB2, but I'd guess something like:
SELECT ID,NAME,CITY,STATE,PROGRAM,CUST_NAME,CUST_ID
FROM MERCHANT_BROWSER_VIEW
WHERE CUST_ID = 'A51B8CA2'
ORDER BY ID
LIMIT 20;
HTH,
Joe