View Single Post
  #1 (permalink)  
Old April 7th, 2004, 05:25 AM
mateenmohd mateenmohd is offline
Friend of Wrox
 
Join Date: Jun 2003
Location: abu dbabi, , United Arab Emirates.
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default case clause in Access

there is any other cluase etc. available in
of CASE clause in ACCESS ?

I am using following query in Access Report but it query give
error message on CASE cluse.

my table save are in SQL Server 2000, I use this query
in ACCESS Report.
this query run properly on sql server but how can
use this query in ACCESS ?

Please guide what cluase can be use in place of CASE clause
in the following query ?


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 'Sr. Resident Engineer' THEN 1
  WHEN 'Resident Engineer' THEN 2
  WHEN 'Asst. Resident Engineer' THEN 3
  WHEN 'Quantity Suveyor' THEN 4
  WHEN 'Inspector (As Built)' THEN 5
  WHEN 'Surveyor' THEN 6
  ELSE 7
 END,
assignments.aposit


Please help.

Mateen


Reply With Quote