Passing parameters with like


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Passing parameters with like

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

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


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center