UNIQIUE NUMBER [message #324267] |
Sun, 01 June 2008 04:50 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
*munnabhai*
Messages: 157 Registered: March 2008 Location: Riyadh
|
Senior Member |
|
|
Hi Guyz,
hope everyone is fine. after a long time i visit this valuable website.
anyhow guyz i have a query if anyone can give me suitable reply to solve my problem.
I have the below table
PAYROLL_ID NUMBER(10)unique,
PAYROLL_DATE DATE (primary key)
at the end of the month im process the payroll
in the PAYROLL_ID i wanna to enter single unique number to all employees.
suppose if i enter --> 10001001 this number at the end of the month or while processing payroll it will save to all employee payroll how can i do this?
and in next month it will show next record 10001002. any valuable solution please?
Regards
|
|
|
Re: UNIQIUE NUMBER [message #324289 is a reply to message #324267] |
Sun, 01 June 2008 09:51 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
I'm not sure I understood what you've said, but it looks like a simple UPDATE statement:UPDATE your_table SET
payroll_id = 10001001; As you've decided to post this question in the Forms forum, I suppose you'll enter this value into a text item. In that case, you'll UPDATE your_table SET
payroll_id = :block_name.item_name;
If you don't enter a value manually, a sequence might be a good choice to obtain aQuote: | single unique number
|
If you have to do that at the end of the month and if payroll_id value doesn't depend on user input, you might schedule this operation as a job using DBMS_JOB or DBMS_SCHEDULER packages.
If nothing of above mentioned "solutions" meets your requirements, I'm afraid I misunderstood the question.
|
|
|