June 25, 2005 at 12:00 am
This must be a simple task. I need to create a stored procedure that will prompt the user to enter the first four letters of a name to return all customers with the letters entered
June 25, 2005 at 3:41 pm
Your program (webpage, Visual Basic or whatever) should prompt the user. Then your program will call the stored procedure with the the 4 letters as a parameter.
So you could have a stored proc something like this:
create proc usp_GetCustomers @Name varchar(4) as
set @Name = @Name + '%' -- add the wildcard
select Name from customers where Name like @Name
return 0
Aunt Kathi Data Platform MVP
Author of Expert T-SQL Window Functions
Simple-Talk Editor
July 3, 2005 at 1:06 pm
don't we need close the wildcard '%'?
July 3, 2005 at 3:18 pm
Kathi HAS closed the single string quote!
**ASCII stupid question, get a stupid ANSI !!!**
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy