Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
We have several legacy files that follow a numbering scheme but are not necessarily in order. I want to change the next document number value instead (ex instead of 00010, I want it to be 00100). All the documentation points at how to CREATE a sequence, but not change it. Does anyone know how to set the value for the sequence after the table as been created?
Solved! Go to Solution.
Each sequence has it's own table:
Each table has a column with a seed value. This is the starting sequence number.
Changing the next number requires changing this seed value:
DBCC CHECKIDENT('<sequence name>', RESEED, <desired start number value minus 1>);
PTC has also documented this in the knowledge base:
https://www.ptc.com/en/support/article/CS153950
You have to change something in the database itself and I believe the approach differs depending on which database engine you are using. Are you on SQL Server or Oracle?
We are using SQL.
You have a table (named 'xxxx_seq') related to this sequence (stored procedure).
You just have to latest value in the column 'value' accordingly to what you need.
You could even truncate the table and insert a row with this initial value (or the one prior the needed one '99).
Each sequence has it's own table:
Each table has a column with a seed value. This is the starting sequence number.
Changing the next number requires changing this seed value:
DBCC CHECKIDENT('<sequence name>', RESEED, <desired start number value minus 1>);
PTC has also documented this in the knowledge base:
https://www.ptc.com/en/support/article/CS153950
Exactly what I needed! Thanks for the quick reply!