Dear Christian There are no plans for such an 'enhancement' foreseen. regards, Martin On 8/15/13 6:31 PM, Christian Kleinke wrote:
Dear all,
is there a possibility to change declared variables in monetdb within a select statement. For example in MySQL the variables can be declared with the @-symbol, and such variables easily could be changed in a case-when condition.
Here a little example of what I want to do (in MySQL syntax):
SET @id = ''; SET @pos = 1;
drop table if exists test_table; create table test_table as select *, if (@id<> id, @pos:=1, @pos:=@pos+1) as position_number, @id:=id, from table_with_ids;
Here the rows with identical ids should be counted, and if the id changes the position_number should start again as zero. If somebody has a hint for me, to execute such a query in monetdb, I would be very glad.
Greetings, Christian
_______________________________________________ users-list mailing list users-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/users-list