Click here to Skip to main content
15,890,741 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have four tables in which i have to take take 2 data from each table and have to implement filters to those data.

I Have Table1 with....
Department,project,Passing%..

Second Table.. Table2.....
fees,Candidate name...Candidate Roll Number.

Third Table Table3....
Exam Date,Amount Refund.

i these i have to do filters based on data... it Means if i select only department @ page level stored procedure have to give me all Department names with all Details...Same way with Name.fees from RANGE, Date with FROM and TO... Amount is also With RANGE...


ple help me ASAP..

Thanks in advance...
Posted
Comments
MuhammadUSman1 23-May-13 7:17am    
What you have tried?
please give some piece of Code which you have tried.
Maciej Los 23-May-13 13:56pm    
Please, be more specific and provide more details...
Use "improve question" widget.

1 solution

Please, read my comment...

I'm not sure what do you want to achieve but it sounds like you are looking for a way to build dynamic queries, where the name of table is passed as a parameter.

I would suggest you to read about dynamic SQL:
Execute dynamic sql commands in sql server/[^]
Building Dynamic SQL In a Stored Procedure[^]
 
Share this answer
 
v2

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