ROW_NUMBER() OVER([ORDER BY columnName]).

360 views
Skip to first unread message

Andreas Henningsson

unread,
May 2, 2011, 5:30:38 AM5/2/11
to h2-da...@googlegroups.com
ROW_NUMBER() OVER([ORDER BY columnName]).

I just want to add to this item in the road map. When doing this item
make sure also PARTITION BY work.

Example from MS SQL Server:

SELECT FirstName, LastName, ROW_NUMBER() OVER(PARTITION BY PostalCode
ORDER BY SalesYTD DESC) AS 'Row Number', SalesYTD, PostalCode
FROM Sales.vSalesPerson
WHERE TerritoryName IS NOT NULL AND SalesYTD <> 0;

/Andreas

--
Andreas Henningsson

"Vanligt sunt förnuft är inte särkilt vanligt." -- Voltaire

Thomas Mueller

unread,
May 18, 2011, 2:11:15 AM5/18/11
to h2-database
Hi,

Thanks! I have changed the feature request to:

ROW_NUMBER() OVER([PARTITION BY columnName][ORDER BY columnName]).

Also, I have increased the priority.

Regards,
Thomas

Reply all
Reply to author
Forward
0 new messages