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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Sequence Generation with MS SQL

ailut
1-Newbie

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
Top Tags