how can assign employee [message #526681] |
Wed, 12 October 2011 07:43 |
|
hassan08
Messages: 123 Registered: June 2011 Location: egypt
|
Senior Member |
|
|
Assign employees to their jobs in consideration the maximum number of employees to each jobs is 5 employee plus each job has own the maximum number of employees
we need the maximum number of employees for each job 5 to be variable when need to change this maximum for certain job , change this number from database (form the from of job ) not form code )
tables
emp
emp_no
name
manager
hiredate
salary
job
job_no
job
you can add tables or attributes to tables to complete you business
|
|
|
|
Re: how can assign employee [message #526719 is a reply to message #526681] |
Wed, 12 October 2011 11:07 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Your requirement is not at all clear.
Are you trying to design a form? A DB procedure? Something else?
hassan08 wrote on Wed, 12 October 2011 13:43plus each job has own the maximum number of employees
Where is that defined?
hassan08 wrote on Wed, 12 October 2011 13:43
we need the maximum number of employees for each job 5 to be variable when need to change this maximum for certain job , change this number from database (form the from of job ) not form code )
I have no idea what that means.
hassan08 wrote on Wed, 12 October 2011 13:43
you can add tables or attributes to tables to complete you business
This is homework isn't it?
|
|
|
|
|
|
Re: how can assign employee [message #526724 is a reply to message #526723] |
Wed, 12 October 2011 11:40 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
So what's stopping you from designing the form?
I'm not going to design a form for you. I very much doubt anyone else here will either.
We will happily help with specific technical problems.
|
|
|
|
Re: how can assign employee [message #526729 is a reply to message #526725] |
Wed, 12 October 2011 13:47 |
John Watson
Messages: 8964 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Take it slowly, Hassan. Your last post gives a good starting point. You need to create two tables, call them EMP and JOB. Write the CREATE TABLE statements, with the definitions of each column. Then add the constraints with ALTER TABLE...ADD CONSTRAINT... You need to add a primary key constraint to each table, and a foreign key constraint to the EMP table. When that is done, we can look at what comes next.
|
|
|
Re: how can assign employee [message #526735 is a reply to message #526729] |
Wed, 12 October 2011 14:08 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
As John says, slow down. You need to do this a bit at a time.
Quote:
and job_no will be pk in table emp
I would have thought job_no should be pk in job not emp. If it's not what is?
|
|
|
|