I have a scenario where I want user to input data for search. Statement
looks like
Select course_nbr, attend
From table_1
Where (course_nbr = @course_nbr)
This only allows user to input exact course number and then the query will
return a result.
I want to be able for user to input the first few letters of the course
number and the query should return all course numbers that starts with those
letter.
Any help would be greatly appreciated.
Shan
MJ Taft - 31 Aug 2005 18:57 GMT
try using Where (course_nbr Like @course_nbr)
> I have a scenario where I want user to input data for search. Statement
> looks like
[quoted text clipped - 12 lines]
>
> Shan
Shan - 31 Aug 2005 19:31 GMT
Thanks MJ, That works fine only I have to add a % sign when Im doing a
search for the course number. For example I want all the courses starting
with letter "N". I just use N%.
> try using Where (course_nbr Like @course_nbr)
>
[quoted text clipped - 14 lines]
> >
> > Shan