https://bugs.documentfoundation.org/show_bug.cgi?id=116982

--- Comment #6 from rob...@familiegrosskopf.de ---
(In reply to robert from comment #5)
> This is the code for getting all generators:
> 
> SELECT * FROM RDB$GENERATORS;
> 
> ... but don't know the right generator.
> 
> Could we save the name of the generator in the description of the field,
> which should be the autovalue-field?
> 
> For HSQLDB you haven't to know this, because the code only need the table
> and the field.

Have found this:
SELECT RDB$FIELD_NAME, RDB$RELATION_NAME, RDB$GENERATOR_NAME  FROM
RDB$RELATION_FIELDS WHERE RDB$GENERATOR_NAME IS NOT NULL

Will show the generatorname for the fields of the tables with autoincrement
value.

Generatornames are RDB$1, RDB$2 and so on ...
ALTER SEQUENCE RDB$1 RESTART WITH 10;
Sets the generator to 10. This should be the last value of the
autoincrement-field. Not the value, which should be generated as next value!
Next autoincremented value will be 11, when "RESTART WITH 10" is set - a little
bit confusing.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to