surname name

tmarsh

tmarsh
Local time
Today, 21:42
Joined
Sep 7, 2004
Messages
89
I have a query with the following sql:
Code:
SELECT QY_ALL.TB_STAFF_STAFF_ID, QY_ALL.LNAME, QY_ALL.FNAME, QY_ALL.JOB_TITLE, QY_ALL.BASE, QY_ALL.DEPT_WARD, QY_ALL.STATUS, QY_ALL.COURSES_DONE_ID, QY_ALL.COURSE, QY_ALL.START_DATE, QY_ALL.END_DATE
FROM QY_ALL
WHERE (((QY_ALL.DEPT_WARD)=[Enter Dept/Ward]) AND ((QY_ALL.STATUS)="CURRENT") AND ((QY_ALL.COURSES_DONE_ID)=[SELECT COURSE ID]) AND ((QY_ALL.START_DATE) Between [Enter start date] And [Enter end date]))
ORDER BY QY_ALL.LNAME, QY_ALL.FNAME;
When I run a report off it it returns correct data except it treats same surnames as one. E.g. if I have Jon, Jo and Fred Smith I get Jon listed but Jo and Fred's records attributed to him.

Is the sql wrong or do I fix it in the report?

Thanks.
 
I think this is a report-level thing. If the report contains LNAME and FNAME as separate fields, you want a break on LNAME and an inner break on FNAME. Just because you have a break on FNAME doesn't mean you need a separate header or footer. You can have one, but you don't NEED one.
 

Users who are viewing this thread

Back
Top Bottom