Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Revised Query Like problems not filtering.

Status
Not open for further replies.

seanybravo

IS-IT--Management
Sep 24, 2003
89
GB
Could someone please tell me why this query is returning all of my records?

SELECT tblData.*, tblTitle.*, tblCustomCategory.* FROM (((((tblData LEFT JOIN (SELECT * FROM tblTitle IN 'E:\Websites\ebusinessdirectories\Database\Admin.mdb') AS tblTitle ON tblData.fldContactTitle = tblTitle.fldTitleID) LEFT JOIN tblCustomCategory ON tblData.fldCategory1 = tblCustomCategory.fldID) LEFT JOIN tblCustomCategory AS tblCustomCategory1 ON tblData.fldCategory2 = tblCustomCategory1.fldID) LEFT JOIN tblCustomCategory AS tblCustomCategory2 ON tblData.fldCategory3 = tblCustomCategory2.fldID) LEFT JOIN tblCustomCategory AS tblCustomCategory3 ON tblData.fldCategory4 = tblCustomCategory3.fldID) WHERE (tblCustomCategory.fldDefinition LIKE '%%' OR tblCustomCategory1.fldDefinition LIKE '%A_Sean[[]0[]]%' OR tblCustomCategory2.fldDefinition LIKE '%A_Sean[[]0[]]%' OR tblCustomCategory3.fldDefinition LIKE '%A_Sean[[]0[]]%') ORDER BY fldCompanyName
 
The following doesn't filter much !
tblCustomCategory.fldDefinition LIKE '%%'

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks for you help. I had an error in one of my functions generating the SQL.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top