Asger Blond
ab-mi at post3.tele.dk
Tue May 10 16:55:31 CDT 2011
Happy to know my grammar was right ;-) Asger -----Oprindelig meddelelse----- Fra: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] På vegne af Robin Lawrence Sendt: 10. maj 2011 23:27 Til: Access Developers discussion and problem solving Emne: Re: [AccessD] using Like with ODBC That's right Lambert, Some of us are still too lazy to write out the proper SQL :) Regards Robin ----- Original Message ----- From: "Heenan, Lambert" <Lambert.Heenan at chartisinsurance.com> To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> Sent: Tuesday, May 10, 2011 9:42 PM Subject: Re: [AccessD] using Like with ODBC I think that it's working because Robin has changed his criteria in the query design grid, so LIKE "%sold%" OR LIKE "%returned%" OR LIKE "%finished%" Would be just fine. Behind the scenes Access will build the SQL so it reads [Status] LIKE "%sold%" OR [Status] LIKE "%returned%" OR [Status] LIKE "%finished%" Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Asger Blond Sent: Tuesday, May 10, 2011 4:31 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] using Like with ODBC >> Well that worked Is that really so? I would expect that you also have to repeat the field name in front of each LIKE, ie.: [Status] LIKE "%sold%" OR [Status] LIKE "%returned%" OR [Status] LIKE "%finished%" Asger -----Oprindelig meddelelse----- Fra: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] På vegne af Robin Lawrence Sendt: 10. maj 2011 20:12 Til: Access Developers discussion and problem solving Emne: Re: [AccessD] using Like with ODBC Hi Drew, Well that worked I already tried that but must have had a typing error in there somewhere.. Many thanks Robin ----- Original Message ----- From: "Drew Wutka" <DWUTKA at marlow.com> To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> Sent: Tuesday, May 10, 2011 6:57 PM Subject: Re: [AccessD] using Like with ODBC > If you are using ADO, the problem probably isn't like, it's *, ADO uses > % instead of the asterisk. > > Drew > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Robin > Lawrence > Sent: Tuesday, May 10, 2011 12:52 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] using Like with ODBC > > Hi All > > I'm connecting to a Sage Line 50 Accounts program via ODBC and need to > do a > multiple LIKE selection from Access XP > > ie in the query criteria > [Status] > LIKE "*sold*" OR LIKE "*returned*" OR LIKE "*finished*"' but am getting > a > syntax error from the ODBC driver > > > Been a while since I've had to do this - can't remember the workaround, > any > help greatly appreciated..... > TIA > > Robin Lawrence > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > The information contained in this transmission is intended only for the > person or entity > to which it is addressed and may contain II-VI Proprietary and/or II-VI > Business > Sensitive material. If you are not the intended recipient, please contact > the sender > immediately and destroy the material in its entirety, whether electronic > or hard copy. > You are notified that any review, retransmission, copying, disclosure, > dissemination, > or other use of, or taking of any action in reliance upon this information > by persons > or entities other than the intended recipient is prohibited. > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com