New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemenation of ROWNUM [CORE3129] #3506
Comments
Modified by: @dyemanovsecurity: Developers [ 10012 ] => |
Commented by: @dyemanov I don't see any practical value in ROWNUM_ID, sorry. As for the regular ROWNUM, cannot it be substituted with the standard window function ROW_NUMBER? |
Commented by: Alexandr Morozov (ak47_morozov) Thank you. I did not know about the development of row_number. But it would be only in firebird 3.0 ( |
Commented by: @dyemanov Your suggestion wouldn't go into any earlier version anyway, as v2.5 is in the feature-freeze mode and is being released and prior versions are in the maintenance mode and allow bugfixes only. |
Modified by: @asfernandes |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: Alexandr Morozov (ak47_morozov)
Duplicates CORE2830
I create UDF that implemented mehanism to get a row number in sql query.
example return:
1 name1
2 name2
3 name3
In addition it can provide the line number by ID.
Example:
table:
id, name
10 Name1
13 Name2
27 Name3
select
rownum_id(http://p2.id, current_timestamp) as num, http://p2.name
from
table p1, table p2
returns:
num name
1 Name1
2 Name2
3 Name3
1 Name1
2 Name2
3 Name3
function may store unique values and return them, else return increment.
function mehanism base on c++ stl::map, and not so hard.
function compiled on many platform with gcc and msvc8.
function work correctly with many users and free of memory leak.
Can you add this feature in your SUDB directly? I may send the source code.
I want to see some implementation in firebird system funcs (thanx to round, trim, substring, dateadd, extract and other)
The text was updated successfully, but these errors were encountered: