Re: SQL Challenge: Arbitrary Cross-tab

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: SQL Challenge: Arbitrary Cross-tab
Дата
Msg-id 200408172041.09517.josh@agliodbs.com
обсуждение исходный текст
Ответ на Re: SQL Challenge: Arbitrary Cross-tab  ("Greg Sabino Mullane" <greg@turnstep.com>)
Список 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 по дате отправления:

Предыдущее
От: "Greg Sabino Mullane"
Дата:
Сообщение: Re: SQL Challenge: Arbitrary Cross-tab
Следующее
От: Joe Conway
Дата:
Сообщение: Re: SQL Challenge: Arbitrary Cross-tab