I m using a table GATE_PASS which has a primay key named GP_ID.the structure of GP_ID is 0000/MM/YY. I want to start a new series from 0000 after 30th june of every year.anyone could help me????

Recommended Answers

All 3 Replies

What exactly you want, What is the data type of that PK field ?
Please pass more information.

What exactly you want, What is the data type of that PK field ?
Please pass more information.

The data type of PK is varchar2.i want to start PK from 0 at the start of each financial year(starts from JUL).Can u help me in this regard????

You need to generate the PK value dynamically based on system date using a procedure. For the serial number use a SEQUENCE to generate a serial of non-repeating numbers.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.