Re: [GENERAL] difficult JOIN

2005-01-29 Thread Sim Zacks
You're going to need a cursor or a for loop. No way to join them. ""Thomas Chille (spoon)"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > i have the following SQL-Problem: > > We are using 2 tables. The first, called plan, is holding planned working times for employees per

Re: [GENERAL] difficult JOIN

2005-01-26 Thread Jim C. Nasby
On Wed, Jan 26, 2005 at 11:22:48AM +0100, Thomas Chille wrote: > In the meanwhile i gave every record an position counter (per tour and > employee), derrived from begin_time, per trigger, and merged them in > this way: How are you generating the position counter? A sequence? If you multiply by som

Re: [GENERAL] difficult JOIN

2005-01-26 Thread Martijn van Oosterhout
On Wed, Jan 26, 2005 at 11:22:48AM +0100, Thomas Chille wrote: > > More important, does it even make sense? What if an employee ends up not > > working at all for one of his/her planned times? Every record after that > > would be completely skewed. Wouldn't it make much more sense to either > > ass

Re: [GENERAL] difficult JOIN

2005-01-26 Thread Thomas Chille
Hi Jim, thanks for your answer! > Hrm. So for a given tour, employee, you want to pair the first record in > plan with the first record in work, and the second record in plan with > the second record in work? Yes you understand me well, thats what i'm trying to achieve. > Doing that will be pre

Re: [GENERAL] difficult JOIN

2005-01-25 Thread Jim C. Nasby
On Tue, Jan 25, 2005 at 05:26:50PM +0100, Thomas Chille wrote: > Hi, > > i have the following SQL-Problem: > > We are using 2 tables. The first, called plan, is holding planned working > times for employees per > tour: > > plan.id_tour > plan.id_employee > plan.begin_time > plan.end_time > > T

[GENERAL] difficult JOIN

2005-01-25 Thread Thomas Chille (spoon)
Hi, i have the following SQL-Problem: We are using 2 tables. The first, called plan, is holding planned working times for employees per tour: plan.id_tour plan.id_employee plan.begin_time plan.end_time The second table 'work' stores the actual worked times for employees per tour: work.id_tour wor

[GENERAL] difficult JOIN

2005-01-25 Thread Thomas Chille
Hi, i have the following SQL-Problem: We are using 2 tables. The first, called plan, is holding planned working times for employees per tour: plan.id_tour plan.id_employee plan.begin_time plan.end_time The second table 'work' stores the actual worked times for employees per tour: work.id_tour work