DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2005
    Posts
    1

    Passing parameters with like

    I was wondering I am able to pass a parameter but I want it to be like a string search. It is a persons name so if I wrote in Dan I want to be able for it to find Daniel. Thanks for any help.

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    What kind of database? In SQL Server, you may either pass 'Dan%' as the parameter, or add the wildcard character within the stored procedure, e.g.:

    SELECT * FROM TableName
    WHERE Column LIKE (@param + '%')
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

Similar Threads

  1. Replies: 1
    Last Post: 06-14-2002, 03:49 PM
  2. Passing parameters to the "main" method
    By Andrew McLellan in forum Java
    Replies: 4
    Last Post: 12-07-2001, 02:55 PM
  3. passing uniqueidentifier parameters to command objects
    By Michael Shutt in forum VB Classic
    Replies: 2
    Last Post: 12-29-2000, 07:55 AM
  4. Passing Parameters to Access 97 Database
    By Robert Boudra in forum VB Classic
    Replies: 3
    Last Post: 12-19-2000, 11:44 AM
  5. Not passing in all the parameters
    By David in forum VB Classic
    Replies: 2
    Last Post: 06-21-2000, 10:09 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links