Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Select Statement return nothing


Message #1 by gbrown@c... on Thu, 27 Sep 2001 13:03:08
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






  Return to Index