Change next number in wt sequence
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Change next number in wt sequence
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.
- Labels:
-
General Customization
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
We are using SQL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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).
www.4cad.ca
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Exactly what I needed! Thanks for the quick reply!