Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Services / Reporting Services / August 2005

Tip: Looking for answers? Try searching our database.

Using parameters

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Shan - 31 Aug 2005 17:17 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.