Is there any way to have a table with fields that would auto increment based on some data value? What I want is a table that has an 'id' field that would be auto increment. And then a field for a 'type' and then a field for the auto increment for this type. Here illustrates with some values:
id type typeid
1 1 1
2 2 1
3 2 2
4 3 1
5 1 2
6 2 3
Can you see the sequences? The table keeps a master sequence and each type has it's own sequence.
I know that a trigger will be necessary to do this. But I haven't thought of a good way to write it.
Gerry
id type typeid
1 1 1
2 2 1
3 2 2
4 3 1
5 1 2
6 2 3
Can you see the sequences? The table keeps a master sequence and each type has it's own sequence.
I know that a trigger will be necessary to do this. But I haven't thought of a good way to write it.
Gerry
Comment