Subject | AW: [firebird-support] how to do a view (or work with) of top 80000 records |
---|---|
Author | Alexander Gräf |
Post date | 2005-06-22T18:09:23Z |
> what I want is thisHow about this:
>
> CREATE VIEW V_TOPCUST
> AS
> select first 80000 *
> from customers
> order by weighted_value desc
>
> but it doesnt work.
CREATE VIEW NEW_VIEW (
NAME,
WEIGHTED_VALUE)
AS
SELECT Name, Weighted_Value FROM Customers
WHERE Weighted_Value >=
(SELECT FIRST 1 SKIP 1 Weighted_Value FROM Customers
ORDER BY Weighted_Value DESC);
Cheers, Alex