Home » Developer & Programmer » Forms » UNIQIUE NUMBER
UNIQIUE NUMBER [message #324267] Sun, 01 June 2008 04:50 Go to next message
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_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?


Re: UNIQIUE NUMBER [message #324289 is a reply to message #324267] Sun, 01 June 2008 09:51 Go to previous message
Messages: 21146
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 a
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.
Previous Topic: Is Block can be parameter in function?
Next Topic: how to count record in a block?
Goto Forum:

Current Time: Wed Aug 16 20:41:50 CDT 2017

Total time taken to generate the page: 0.11060 seconds