Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > SQL Language
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 17th, 2005, 06:55 AM
Authorized User
 
Join Date: May 2004
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with "where = " select statement

I am using a where = statement (in asp.net)

WHERE = "my_value"

("my_value is a variable a user passes entering a Form)

It works fine only if the user's search matched exactly my database value: say if he entered 'Martin Scorsese'

However if he entered only "Scorsese" his search does not give any result.
Any way out with this?
Many thanks
Shirley

Reply With Quote
  #2 (permalink)  
Old October 17th, 2005, 06:59 AM
Authorized User
 
Join Date: Sep 2005
Location: , , .
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Use WHERE LIKE '%my_value%' instead

http://sqlservercode.blogspot.com/
Reply With Quote
  #3 (permalink)  
Old October 17th, 2005, 08:10 AM
Authorized User
 
Join Date: May 2004
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I will have a go and let you know.
Many thanks

Reply With Quote
  #4 (permalink)  
Old October 17th, 2005, 04:07 PM
Authorized User
 
Join Date: May 2004
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

WHERE Titolo LIKE '%"+requestedValue+"%'

it works perfectly
many thanks!:)

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
New Bie- Select Statement problem sparsh2010 Access VBA 1 January 22nd, 2008 01:00 PM
Problem with SELECT INTO statement 132591 SQL Language 1 November 27th, 2006 06:58 AM
SQL select statement problem shrisangeeta Classic ASP Databases 3 June 15th, 2006 10:28 AM
Problem with select statement s.abraham ASP.NET 1.0 and 1.1 Basics 2 March 24th, 2005 02:29 PM
SELECT statement...strange problem abbylee26 Classic ASP Databases 7 March 16th, 2004 02:34 PM



All times are GMT -4. The time now is 02:41 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.