Sequence
Goal
Write mask
rule logic using the sequence
input source to
- insert a sequence of integers into a column
- starting with the first INTEGER value and incremented by the second INTEGER value
- If -1 is as the first INTEGER value, the sequence starts with the highest value stored in the column plus the increment
Ano Structure and Examples
- Structure
- update example
- create example
...
mask <column> <rule-name>
format %d
unique
sequence <start> <increment>
temporary-value 999999 // optional temporary value for a not null constraint
...
table birth_certificate
...
column integer ID
column integer alternative_ID
...
primary-key ID
...
task ... {
update birth_certificate
...
mask alternative_ID
format %d
unique
sequence -1 1
temporary-value 999999
}
table birth_certificate
...
column integer ID
column integer alternative_ID
...
primary-key ID
...
task ... {
create birth_certificate minimum-rows 50
...
mask alternative_ID
format %d
unique
sequence 100000 1
temporary-value 999999
}
- Specify integer format
%d
<start>
: Value to start from.-1
to start from highest existing value + increment<increment>
: how much to increment