SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict rokc's Avatar
    Join Date
    Oct 2004
    Posts
    280
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem with stored procedure

    hi,

    I am using a simple stored procedure that just searches for the cities whos name starts with the keyword enterd. But the below code dosnt seems to work. any ideas.

    I am using SQL Server 2000
    Code:
    CREATE PROCEDURE va_search_location
    @keyword varchar(50)
    AS
    Select * from tblcities where CityName like '@keyword%'
    GO
    THANKS

  2. #2
    SitePoint Addict rokc's Avatar
    Join Date
    Oct 2004
    Posts
    280
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    problem solved..missed on concatenating part
    Code:
    Select * from tblcities where CityName like @keyword+'%'


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
  •