Re: SQL Challenge: Arbitrary Cross-tab - Mailing list pgsql-sql

From Josh Berkus
Subject Re: SQL Challenge: Arbitrary Cross-tab
Date
Msg-id 200408172041.09517.josh@agliodbs.com
Whole thread Raw
In response to Re: SQL Challenge: Arbitrary Cross-tab  ("Greg Sabino Mullane" <greg@turnstep.com>)
List 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


pgsql-sql by date:

Previous
From: "Greg Sabino Mullane"
Date:
Subject: Re: SQL Challenge: Arbitrary Cross-tab
Next
From: Joe Conway
Date:
Subject: Re: SQL Challenge: Arbitrary Cross-tab