Click here to Skip to main content
16,004,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all

i am having below 2 tables

VB
qno
question
option_1
option_2
option_3
option_4
option_5
answer
subject


and 2nd one is

VB
qno
question
option_1
option_2
option_3
option_4
option_5
answer
subject
docname
year


i want to fetch the different values from both the tables depending on question and have to display in a gridview.
please tell me what query i have to write for that...
Posted
Comments
Abhijit Parab 27-Sep-12 2:51am    
just give one example, it is not clear from given question
[no name] 27-Sep-12 2:54am    
e.g like: if i type some word in a textbox then it should search in both the tables and should return
question answer subject docname year

1 solution

You question is unfortunately too vague to make out what you are looking for.
However using a UNION[^] or a JOIN[^] clause should help you get to a solution.
 
Share this answer
 
Comments
[no name] 27-Sep-12 2:55am    
I searched in google regarding this but not getting
e.g like: if i type some word in a textbox then it should search in both the tables and should return
question answer subject docname year

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