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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Autonumbering ECR/ECN

bwilson-2
4-Participant

Autonumbering ECR/ECN

I have set up my OIR for ECR to use a prefix on the autonumber of ECR-. It is set to user a five digit number. The question is I need the numbering to start at 50000 instead of 00000. I was told this is possible but can't seem to figure out how to do it. Any ideas would be greatly appreciated.

Brian

8 REPLIES 8

you have to run some SQL for the sequence in Oracle. If you can't find an old posting referencing this, I'm sure someone has it handy.

Sent from my Verizon Wireless BlackBerry


Hi Brian,
I just did the same thing to get the numbering to start at 80000. Our numbers go "EP-80000", "EP-80001", "EP-80002", etc. Here's what you do.....
a.
Open Windchill shell and login to sqlplus

b.
Run the following script. It creates a new numbering scheme called “EP_NUMS” that
can be referenced in the OIR of the object in the “numbering” section. It starts at 80000 and increments by 1:

> exec
wtpk.createSequence(‘EP_NUMS’,80000,1)
c. in your OIR, specify the number scheme to use. The number 6 represents the number of digits you want displayed:

<attrvalue<br/>id="number"
algorithm="com.ptc.windchill.enterprise.revisionControlled.server.impl.NumberGenerator">

<arg>EP-</arg>


<arg>{GEN:wt.enterprise.SequenceGenerator:EP_NUMS:6:0}</arg>

</attrvalue>
Mike -


avillanueva
22-Sapphire I
(To:bwilson-2)

I just did this myself last week. I think you can replace create with
update or you could drop and recreate the sequence. You need to do this
as your pdmlink user from a SQLPLUS prompt (or TOAD).



CREATE SEQUENCE WTCHANGEORDERID

START WITH 50000

MAXVALUE 99999

MINVALUE 1

NOCYCLE

CACHE 20

NOORDER;




avillanueva
22-Sapphire I
(To:bwilson-2)

Oops, typo:

CREATE SEQUENCE WTCHANGEORDERID_SEQ

START WITH 50000

MAXVALUE 99999

MINVALUE 1

NOCYCLE

CACHE 20

NOORDER;




The other thing to note about this is the "CACHE 20", what Oracle does is
it will grab 20 numbers, assign those, then it will grab 20 more. If
you've used 1 of those sequence numbers and you restart, it will lose the
remaining 19. Not a big deal, but some people don't like to have gaps in
the numbering sequence. I believe the reason behind this is performance,
so it depends on your environment, it may or may not be an issue.




CREATE SEQUENCE WTCHANGEORDERID_SEQ

START WITH 50000

MAXVALUE 99999

MINVALUE 1

NOCYCLE

CACHE 20

NOORDER;

> Oops, typo:
>
> CREATE SEQUENCE WTCHANGEORDERID_SEQ
>
> START WITH 50000
>
> MAXVALUE 99999
>
> MINVALUE 1
>
> NOCYCLE
>
> CACHE 20
>
> NOORDER;
>
>
>
>
>

So you can change it to "Cache 1" maybe and avoid this but possibly run into performance issues correct?


Steve Vinyard
Application Engineer

I believe that is correct. I don't think it can go to 0.

You can use "Cache 1" or "NOCACHE"
Top Tags