* Brett Harvey
[...]
> SELECT WO.client_no, WO.wo_number, WO.priority_no,
> Client.client_name, Client.client_no, Client. Client_type,
> Priority.Priority_vw
>
> FROM FMS.WorkOrder
> LEFT JOIN FMS.Client ON WO.Client_No=Client.Client_No
> LEFT JOIN FMS.Priority
> ON
> IF ( Client.Client_type="School District",
> WO.priority_ref_no=Priority.priority_ref_no And
> Priority.Client_No=0 And Priority.client_type="School District",
> WO.priority_ref_no=Priority.priority_ref_no And
> WO.Client_No=Priority.Client_No
> )
Not sure if I understood your problem, but have you tried combining your ON
clause with a WHERE clause with an OR condition:
SELECT ...
FROM FMS.WorkOrder WO
LEFT JOIN FMS.Client ON
WO.Client_No=Client.Client_No
LEFT JOIN FMS.Priority ON
WO.priority_ref_no=Priority.priority_ref_no
WHERE
(Client.Client_type="School District" AND
Priority.Client_No=0 AND
Priority.client_type="School District")
OR
(WO.Client_No=Priority.Client_No)
--
Roger
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]