Records Table (db):
| University | Faculty | Course | Duration |
| MMU | IT | BIS | 4yrs |
| Boston | Business | ACC | 4yrs |
If I search for Faculty (IT) my Results should be all Courses Under IT and their Duration and also all university that offers IT
For Example;
Search result:
Faculty Of IT:
| Course | Duration | Fees | University |
| BIS | 4yrs | 2000 | MMU |
How do I do this?
Ravikumar GPosted Apr 24, 2013, 3:05 AM
Pradip PandeyPosted Apr 24, 2013, 1:27 AM
The query will be
Select Course,Duration, University
From db
Where Faculty="IT"
I assume db is the table name here.
You can use a stored procedure as well to get the result based on faculty type.
Create Procedure P_GetCourseDetail
(
@Type varchar(20)
)
As
SET NOCOUNT ON
Begin
Select Course,Duration, University
From db
Where Faculty="IT"
End
SET NOCOUNT OFF
GO
Hope it will help.
Sreejesh SPPosted Apr 24, 2013, 12:42 AM
plase use below query
select Cource,Duration,'2000' as Fees,University
From
where Faculty=IT
Thanks
Sreejesh