Board index » delphi » Re: Help with SelectSQL
jackie
![]() Delphi Developer |
Re: Help with SelectSQL2003-08-09 01:09:53 PM delphi131 Sorry about previous formatting. Hoping this works: when X =2 I want only records for employees that worked for 2 or more days for a given employee. Hence the included records (that is the ones I want returned) are as follows: Excluded Included DRID EMPID JOBDATE DRID EMPID JOBDATE 6 232 15/07/2003 6 419 15/07/2003 7 403 18/07/2003 7 403 21/07/2003 7 403 22/07/2003 7 403 23/07/2003 7 403 24/07/2003 7 403 25/07/2003 11 243 02/07/2003 11 243 03/07/2003 11 243 04/07/2003 12 48 18/07/2003 12 87 01/07/2003 12 87 02/07/2003 12 131 09/07/2003 12 277 08/07/2003 12 277 09/07/2003 12 277 10/07/2003 12 277 11/07/2003 12 277 14/07/2003 12 277 15/07/2003 12 361 11/07/2003 12 371 01/07/2003 12 371 02/07/2003 12 371 03/07/2003 etc etc when X =3 I want only records for employees that worked for 3 or more days for a given employee. Hence the included records (that is the ones I want returned) are as follows: Excluded Included DRID EMPID JOBDATE DRID EMPID JOBDATE 6 232 15/07/2003 6 419 15/07/2003 7 403 18/07/2003 7 403 21/07/2003 7 403 22/07/2003 7 403 23/07/2003 7 403 24/07/2003 7 403 25/07/2003 11 243 02/07/2003 11 243 03/07/2003 11 243 04/07/2003 12 48 18/07/2003 12 87 01/07/2003 12 87 02/07/2003 12 131 09/07/2003 12 277 08/07/2003 12 277 09/07/2003 12 277 10/07/2003 12 277 11/07/2003 12 277 14/07/2003 12 277 15/07/2003 12 361 11/07/2003 12 371 01/07/2003 12 371 02/07/2003 12 371 03/07/2003 etc etc |