Menu

#12 New feature in Seq().

open
nobody
5
2002-05-20
2002-05-20
No

An useful feature to add to the SQL Seq() function
would be to restart the sequence when a field in the
table changes. This would allow to sequence groups of
row, e.g.:

SELECT seq(fieldA), field FROM table

SEQ() FieldA
1 AAAA
2 AAAA
3 AAAA
4 AAAA
5 AAAA
6 AAAA
7 AAAA
1 BBBB
2 BBBB
3 BBBB
1 CCCC
2 CCCC
3 CCCC
4 CCCC

It would be also useful to specify the initial
sequence number and the increment: seq(fielda, 5, 5).

Discussion


Log in to post a comment.