Hi,
After I have importing an excel file my report is reading a code field like there is a value in every record when there are thousands of blanks how can I sort this problem.
Hi easyit,
Sorry I didn't explain properly, The file has 23 thousand staff records not all of them has a code number beside there name which is the way it should be. But the table is saying that although the code field for some are blank that there is a value in there. There is a date field in the table too and if I copy all the blank records from that and copy them to the blanks in the code field then I can have a proper count of the staff who have been coded. I think it is a "Is dirty" issue. I hope I have explained it better now.
why don't you post the SQL of queries 1 & 2, maybe someone can help you figure out how to do it in a single query. A "visual" of the table and your expected results can also be extremely useful in assisting you.
Leslie
Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual
Hi Les,
There are 8641 records in "tblacuteservices" that do not have a code number if I click in any of those blank fields and filter by selection I will only get 1 record. For some reason the table thinks that every record has a value in the code field. Here are the SQL'S:
Query 1
SELECT tblacuteservices.Directorate, tblacuteservices.StaffGroup, tblacuteservices.PayNumber, tblacuteservices.Code, tblacuteservices.Left
FROM tblacuteservices
WHERE (((tblacuteservices.Code)<>"") AND ((tblacuteservices.Left)=""));
Directorate StaffGroup PayNumber Code Left
Medical Nursing (Tr.) G0807397 N1000
Medical Nursing (Untr.) G5931169 N1001
Medical Nursing (Untr.) G5808448 N1001
Query 2
SELECT tblacuteservices.Directorate AS Division, tblacuteservices.StaffGroup AS [Staff Category], Count(tblacuteservices.PayNumber) AS TotalStaff, tblacuteservices.Left
FROM tblacuteservices
GROUP BY tblacuteservices.Directorate, tblacuteservices.StaffGroup, tblacuteservices.Left
HAVING (((tblacuteservices.Left)=""));
SELECT qryacuteservicesreport2.Division, qryacuteservicesreport2.[Staff Category], qryacuteservicesreport2.TotalStaff, Count(qryacuteservicesreport1.Code) AS SCode
FROM qryacuteservicesreport2 LEFT JOIN qryacuteservicesreport1 ON (qryacuteservicesreport2.Division = qryacuteservicesreport1.Directorate) AND (qryacuteservicesreport2.[Staff Category] = qryacuteservicesreport1.StaffGroup)
GROUP BY qryacuteservicesreport2.Division, qryacuteservicesreport2.[Staff Category], qryacuteservicesreport2.TotalStaff;
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.