cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Sequence Generation with MS SQL

ailut
2-Explorer

Sequence Generation with MS SQL

Hi guys,

I recently started with Windchill 10.2 and I have the following problem:

I need a new sequence generator that will generate the sequence from 000001 to 999999. I am using the following sql script:

CREATE TABLE wt_sequence_WTTESTID (dummy CHAR(1), value BIGINT IDENTITY(000001, 1))

go

CREATE PROCEDURE wt_get_next_sequence_WTTESTID @returnValue BIGINT OUTPUT

AS

INSERT wt_sequence_WTTESTID (dummy) VALUES ('x')

SELECT @returnValue = SCOPE_IDENTITY()

go

The question is how can I set the upper limit to 999999?

Thanks,

Alex

0 REPLIES 0
Announcements


Top Tags