pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedDB2 to Postgresql conversion help.
2+ messages / 2 participants
[nested] [flat]
* DB2 to Postgresql conversion help.
@ 2002-12-23 16:32 John Pauley <karstdiver@yahoo.com>
0 siblings, 1 reply; 2+ messages in thread
From: John Pauley @ 2002-12-23 16:32 UTC (permalink / raw)
To: pgsql-sql
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
TIA, Happy Holidays,
jp
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: DB2 to Postgresql conversion help.
@ 2002-12-23 17:13 Joe Conway <mail@joeconway.com>
parent: John Pauley <karstdiver@yahoo.com>
0 siblings, 0 replies; 2+ messages in thread
From: Joe Conway @ 2002-12-23 17:13 UTC (permalink / raw)
To: John Pauley <karstdiver@yahoo.com>; +Cc: pgsql-sql
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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2002-12-23 17:13 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-12-23 16:32 DB2 to Postgresql conversion help. John Pauley <karstdiver@yahoo.com>
2002-12-23 17:13 ` Joe Conway <mail@joeconway.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox