Pages

Sunday, March 2, 2014

Oracle Receivables (AR) Set the Customer Account Automatic Numbering

The database sequence that handles the creation of customer numbers is defined in HZ_ACCOUNT_NUM_S.
select max(account_number) from ar.hz_cust_accounts_all;
Then using the number returned above, define the sequence to start with a higher value.

If for example the above returns 1114, then you can do the following to ensure the sequence will not create overlapping account numbers:
DROP SEQUENCE AR.HZ_ACCOUNT_NUM_S;
CREATE SEQUENCE AR.HZ_ACCOUNT_NUM_S START WITH 1115 INCREMENT BY 1 MAXVALUE 999999 CACHE 20;