I have the following code which is supposed to return documents for only that persons id (5759)What I am trying to say on my selection criteria is that if any and not all of those have TEST in it select it but only if it is associated to the id of 5759What I am getting at the moment is that it works for the first two select (client_ref and title) but not est_id which is an int.select status_desc, title, client_ref,(cl_contact_fname + ' ' + cl_contact_lname) as contact_name, est_datetime,e.est_id from tblEstimate e,tblEstStatus es,tblclientcontact cc where e.status_id=es.status_id and cc.cl_contact_id=cc_id and (cc_id='5759' or cc_id in (select cl_contact_id_2 from tblClientContactViewContact where cl_contact_id_1='5759') ) and e.status_id in (1,5) and (client_ref like '%' + 'Test' + '%') or (title like '%' + 'Test' + '%') or (est_id like '%' + 'Test' + '%') and (est_datetime >= '01-jan-1980' or est_datetime is NULL) order by est_datetime
any ideas?