Subject | Re: [firebird-support] How To Generate Auto Increment Number in SQL Itself ? |
---|---|
Author | Mark Rotteveel |
Post date | 2015-03-14T12:02:43Z |
On 13-3-2015 17:44, Ann Harrison aharrison@...
[firebird-support] wrote:
work with Firebird. With the SQL standard ROW_NUMBER window function in
Firebird 3 it works well and intelligible.
Mark
--
Mark Rotteveel
[firebird-support] wrote:
> How about a second context variable for the EmpCode and reset theProbably because it isn't SQL at all, it is an ugly hack that happens to
> row_number iff the EmpCode changes? Or, if you'd rather number each row
> for an employee differently and start again at 1 for the next employee,
> increment the row_number unless EmpCode changes then reset to 1.
>
> Sigh. SQL used to be such a simple ugly stupid language.... Am I the
> only one who finds this sort of magic unreadable?
work with Firebird. With the SQL standard ROW_NUMBER window function in
Firebird 3 it works well and intelligible.
Mark
--
Mark Rotteveel