[AccessD] Like Operator SQL Syntax

ACTEBS actebs at actebs.com.au
Thu Jun 5 22:28:20 CDT 2003


Jim,
 
That would be great, I would really appreciate that...
 
If you could send it to actebs at actebs.com.au
 
Thanks again
Vlad

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence
(AccessD)
Sent: Friday, 6 June 2003 12:34 AM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Like Operator SQL Syntax


Hi Vlad:
 
I have a little piece of code that is stored with all my applications.
When set it writes a specific result string into memory. If there are
some issue the code can be pasted into a Access query or SQL  SP and
tested there. It makes it a lot easier to resolve tricky string
problems. I could send it all offline.
 
HTH
Jim

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of ACTEBS
Sent: Thursday, June 05, 2003 7:56 AM
To: access group
Subject: [AccessD] Like Operator SQL Syntax


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/d052406c/attachment-0001.html>


More information about the AccessD mailing list