Click here to Skip to main content
15,900,589 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
SQL
CREATE Procedure dropdownlist
(
mname varchar(200)
)
AS
select medicine_name FROM medicines where medicine_name like mname+'%'

I am using the above query to display values in dropdownlist which the user types.
but it recieves error.

Please help me to come out these.
Thanks in advance.
Posted
Updated 16-Aug-11 22:30pm
v2

1 solution

SQL
CREATE Procedure dropdownlist
(
@mname varchar(200)
)
AS
select medicine_name FROM medicines where medicine_name like @mname + '%'


Specify a parameter name using an at sign (@) as the first character. The parameter name must conform to the rules for identifiers.
Ref:http://msdn.microsoft.com/en-us/library/aa258259(v=sql.80).aspx[^]
 
Share this answer
 
Comments
Simon Bang Terkildsen 17-Aug-11 4:53am    
my 5.
"If you're asking how to resolve an error, then include the Exception/error message/compilation error in your post" should really be on "A few simple rules when posting your question." list on Ask a Question page.
Toniyo Jackson 17-Aug-11 4:54am    
Correct 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900