Re: [Firebird-docs] Wrong example in FB 4.0 Beta release notes

2020-02-10 Thread Köditz , Martin
Hi Mark,

thanks for the clarification.

Regards,
Martin

-Ursprüngliche Nachricht-
Von: Mark Rotteveel [mailto:m...@lawinegevaar.nl] 
Gesendet: Montag, 10. Februar 2020 11:33
An: firebird-docs@lists.sourceforge.net
Betreff: Re: [Firebird-docs] Wrong example in FB 4.0 Beta release notes

On 09-02-2020 22:38, Köditz, Martin wrote:
> I think we have a simple error in the release docs for FB 4.0 Beta 1:
> 
> Section
> 
> *More Window Functions* (Pages: 76-77) Ranking Functions:
> 
[..]
> 
> Simple Example
> The following example illustrates the behaviour of ranking functions. 
> SUM is included for comparison.
> 
> SQL> select
> CON> *id*,
> CON> salary,
[..]
> CON> order by salary;
> Statement failed, SQLSTATE = 42S22
> Dynamic SQL Error
> -SQL error code = -206
> -Column unknown
> -ID
> -At line 2, column
> 
> „id“ has to be „emp_no“. The same for the table.
> 
> Please verify. I don’t have an installation of FB 4.0.

That is only true if you assume the examples are against the example employee 
database, and that is not actually the case.

Both the [Firebird 3][1] and the Firebird 4 beta 1 release notes have used an 
`employee` table with columns `id`, `salary`, `department` for its window 
functions examples.

That table is explicitly introduced in the Firebird 3 release notes (see under 
"Aggregate Functions Used as Window Functions"_) with _"Imagine a table 
EMPLOYEE with columns ID, NAME and SALARY, [..]."_ (note that it doesn't define 
`department`, though that does get used and `name` does not).

Maybe that (corrected) definition needs to be repeated in the Firebird 4 
release notes.

  [1]: 
https://www.firebirdsql.org/file/documentation/release_notes/html/en/3_0/rnfb30-dml-windowfuncs.html

--
Mark Rotteveel


___
Firebird-docs mailing list
Firebird-docs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-docs

___
Firebird-docs mailing list
Firebird-docs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-docs


Re: [Firebird-docs] Wrong example in FB 4.0 Beta release notes

2020-02-10 Thread Mark Rotteveel

On 09-02-2020 22:38, Köditz, Martin wrote:

I think we have a simple error in the release docs for FB 4.0 Beta 1:

Section

*More Window Functions* (Pages: 76-77)
Ranking Functions:


[..]


Simple Example
The following example illustrates the behaviour of ranking functions. 
SUM is included for comparison.


SQL> select
CON> *id*,
CON> salary,

[..]

CON> order by salary;
Statement failed, SQLSTATE = 42S22
Dynamic SQL Error
-SQL error code = -206
-Column unknown
-ID
-At line 2, column

„id“ has to be „emp_no“. The same for the table.

Please verify. I don’t have an installation of FB 4.0.


That is only true if you assume the examples are against the example 
employee database, and that is not actually the case.


Both the [Firebird 3][1] and the Firebird 4 beta 1 release notes have 
used an `employee` table with columns `id`, `salary`, `department` for 
its window functions examples.


That table is explicitly introduced in the Firebird 3 release notes (see 
under "Aggregate Functions Used as Window Functions"_) with _"Imagine a 
table EMPLOYEE with columns ID, NAME and SALARY, [..]."_ (note that it 
doesn't define `department`, though that does get used and `name` does not).


Maybe that (corrected) definition needs to be repeated in the Firebird 4 
release notes.


 [1]: 
https://www.firebirdsql.org/file/documentation/release_notes/html/en/3_0/rnfb30-dml-windowfuncs.html


--
Mark Rotteveel


___
Firebird-docs mailing list
Firebird-docs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-docs


[Firebird-docs] Wrong example in FB 4.0 Beta release notes

2020-02-09 Thread Köditz , Martin
Hi,

I think we have a simple error in the release docs for FB 4.0 Beta 1:

Section
More Window Functions (Pages: 76-77)
Ranking Functions:

DENSE_RANK() |
RANK() |
PERCENT_RANK() |
CUME_DIST() |
NTILE() |
ROW_NUMBER()

Simple Example
The following example illustrates the behaviour of ranking functions. SUM is 
included for comparison.

SQL> select
CON> id,
CON> salary,
CON> dense_rank() over (order by salary),
CON> rank() over (order by salary),
CON> percent_rank() over (order by salary),
CON> cume_dist() over (order by salary),
CON> ntile(3) over (order by salary),
CON> row_number() over (order by salary),
CON> sum(1) over (order by salary)
CON> from employee
CON> order by salary;
Statement failed, SQLSTATE = 42S22
Dynamic SQL Error
-SQL error code = -206
-Column unknown
-ID
-At line 2, column

"id" has to be "emp_no". The same for the table.

Please verify. I don't have an installation of FB 4.0.

Regards,
Martin

___
Firebird-docs mailing list
Firebird-docs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-docs