Hi
I am using this sql statement to return a record set, the depot_id where
clause is not working though. The lang.depot_id is actually 10 spaces so
I would expect this to return one record but both ASP and access return
nothing.
I want to show all records which contain the word "div" in the textmess
column and have an archive_status of anything except "A" have a depot_id
of "belper" or blank.
Could anybody tell me what is wrong with syntax? Seems to be unhappy with
brackets but I can't see why.
SELECT
LANG,textmess,translateto,changed_by,changed_date,created_by,created_date,d
epot_id,costcentre,driver_code FROM LANG where textmess like '%DIV%' and
(depot_id like 'BELPER%' or trim(depot_id)='') and archive_status<>'A'
order by textmess asc;
Regards
Graham