C
cliff
Hi , I have the following query to find employees who took part in current
training were not attended any previous five training programmes.
Selected employees sent for several training in batches. My following
query is working correctly but very very slow. In process it shows message
'recordset is not updateable' and if you try to move between records it is
also very very slow. Is there any way to work fast
SELECT [kenomer no].sr, [kenomer no].en1
FROM [keno mer no]
WHERE not Exists (select [Kenonumcount5].sr,kenonumcount5.en1
from [kenonumcount5]
where [kenomer no].en1=[kenonumcount5].en1 and [kenomer
no].sr=[kenonumcount5].sr and [keno mer no].sr is not null
);
[kenmer no] table
sr
cdate
en1
here sr is training no. cdate is training date, en1 is employee nos.
attended the training
[kenonumcount5] query is query of all those attended previous five trainings
SELECT a.sr, B.en1, (count(a.en1)/5) AS Numcount, max(b.cdate) AS latest,
max(b.sr) AS lastsr
FROM [kenomer no] AS a INNER JOIN [kenomer no] AS B ON (b.sr<a.sr) AND
(b.sr-a.sr<=5) AND (B.SR+5>=A.SR)
GROUP BY a.sr, B.eN1
ORDER BY a.sr, (count(a.eN1)/20) DESC , max(b.cdate) DESC , b.en1;
please help to solve this.
thanks in advance
t
training were not attended any previous five training programmes.
Selected employees sent for several training in batches. My following
query is working correctly but very very slow. In process it shows message
'recordset is not updateable' and if you try to move between records it is
also very very slow. Is there any way to work fast
SELECT [kenomer no].sr, [kenomer no].en1
FROM [keno mer no]
WHERE not Exists (select [Kenonumcount5].sr,kenonumcount5.en1
from [kenonumcount5]
where [kenomer no].en1=[kenonumcount5].en1 and [kenomer
no].sr=[kenonumcount5].sr and [keno mer no].sr is not null
);
[kenmer no] table
sr
cdate
en1
here sr is training no. cdate is training date, en1 is employee nos.
attended the training
[kenonumcount5] query is query of all those attended previous five trainings
SELECT a.sr, B.en1, (count(a.en1)/5) AS Numcount, max(b.cdate) AS latest,
max(b.sr) AS lastsr
FROM [kenomer no] AS a INNER JOIN [kenomer no] AS B ON (b.sr<a.sr) AND
(b.sr-a.sr<=5) AND (B.SR+5>=A.SR)
GROUP BY a.sr, B.eN1
ORDER BY a.sr, (count(a.eN1)/20) DESC , max(b.cdate) DESC , b.en1;
please help to solve this.
thanks in advance
t