Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
StuartAberdein
 
Posts: n/a
Default Parameters in SQL queries using "contains" or "like"


I am trying to build a query to a MS_SQL database that uses parameters
with a "contains" i.e. so that the user can enter a serial number as
1234 and find 01234 or 1234-8

If I don't use a parameter I can enter the query as *-Like '%1234%'-*
and things work fine. However whan I try it as *-Like '%[Enter
Serial]%'-* or *-Like '[%Enter Serial%]'-* then it doesn't work.

Can anybody help me.
Thanks


--
StuartAberdein
------------------------------------------------------------------------
StuartAberdein's Profile: http://www.excelforum.com/member.php...o&userid=35664
View this thread: http://www.excelforum.com/showthread...hreadid=554468

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Web queries & Yahoo! Finance cwhaley Excel Discussion (Misc queries) 1 February 2nd 06 12:31 AM
Too few parameters lou sanderson Excel Discussion (Misc queries) 1 January 13th 06 06:35 PM
too few parameters lou sanderson Excel Discussion (Misc queries) 1 December 14th 05 07:53 PM
Excel Queries with subqueries and parameters theday_99@yahoo Excel Discussion (Misc queries) 0 September 28th 05 01:24 PM
Parameters are not allowed in queries that can't be displayed grap Flora Tzeng Excel Discussion (Misc queries) 1 March 15th 05 10:34 AM


All times are GMT +1. The time now is 01:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"