Re: SQL Challenge: Arbitrary Cross-tab

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: SQL Challenge: Arbitrary Cross-tab
Date: 2004-08-18 03:41:09
Message-ID: 200408172041.09517.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Greg, Stephan,

> (SELECT tid FROM ats WHERE cid=bob.cid LIMIT 1 OFFSET 1) AS tk2,

bzzzzz! Thanks for playing. LIMIT and OFFSET, sadly, are not SQL standard.
They're only portable to MySQL. This has to port to SQL Server and Oracle.

> If that works for 3 (and I think that's standard behavior), then you
> should be able to extend it to any fixed number using the pattern.

Hmmm... that might work. I'll have to test that the nesting doesn't kill SQL
Server (a serious danger) but it's worth a try. Performance will really suck
but fortunately we only run this bill once a month.

--
Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Joe Conway 2004-08-18 05:15:59 Re: SQL Challenge: Arbitrary Cross-tab
Previous Message Greg Sabino Mullane 2004-08-18 03:36:41 Re: SQL Challenge: Arbitrary Cross-tab