[AccessD] Like Operator SQL Syntax

ACTEBS actebs at actebs.com.au
Thu Jun 5 09:55:44 CDT 2003


Hi People,
 
Can anyone tell me what wrong with the following syntax:
 
strSQL = "SELECT tblCustomers.CustomerID, " _
            & "[tblCustomers]![CustomerNumber] & '-' &
[tblCustomers]![CustomerSite] " _
            & "AS CustCode, tblCustomers.CustomerName,
tblCustomers.Address1 & ' ' & " _
            & "tblCustomers.Address2 & ' ' & tblCustomers.Address3 & ' '
& " _
            & "tblCustomers.Postcode AS Address, tblCustomers.DepotID
FROM tblCustomers " _
            & "WHERE (((tblCustomers.CustomerName) Like % + " _
            & strInput & " + %)) " _
            & "ORDER BY tblCustomers.CustomerName;"
 
I am creating an ADO recordset and obviously ADO use % as the wild card
and not * so I am not sure where the issue currently is...
 
Thanks
Vlad
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030606/529b6ab6/attachment-0001.html>


More information about the AccessD mailing list