thanks for your response.
but there are some problem.
I am using this query on ACCESS database Report.
our table are save on SQL Server 2000, I create
link with the table to the ACCESS Report.
ACCESS not accept the CASE CLAUSE.
it give syntax error when I run this query on Access Report.
How can use this clause in ACCESS Report, show that is
display data according the CASE ?
this query run on sql query anayzer but it give error on
Access Report why, how can solve it ?
Regards.
Mateen
Quote:
quote:Originally posted by Gert
I have never tried this method myself, but I saw the following in a book:
Code:
SELECT employees.empno, employees.name, approvals.contractno, assignments.aposit, assignments.acontract, assignments.astrdate, assignments.aenddate
FROM (employees INNER JOIN approvals ON employees.empno = approvals.empno) INNER JOIN assignments ON employees.empno = assignments.empno
order by
CASE assignments.aposit
WHEN 'Resident Engineer' THEN 1
WHEN 'Asst. Resident Engineer' THEN 2
WHEN 'Quantity Suveyor' THEN 3
WHEN 'Inspector' THEN 4
ELSE 5
END,
assignments.aposit
Maybe it will work for you...?
Gert
|