Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hi all
 
i am having below 2 tables
 
qno
question
option_1
option_2
option_3
option_4
option_5
answer
subject
 
and 2nd one is
 
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 26-Sep-12 20:42pm
Comments
Abhijit Parab at 27-Sep-12 2:51am
   
just give one example, it is not clear from given question
snehasish nandy at 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

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
snehasish nandy at 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)

  Print Answers RSS
0 OriginalGriff 6,656
1 Sergey Alexandrovich Kryukov 6,490
2 CPallini 5,310
3 George Jonsson 3,584
4 Gihan Liyanage 2,650


Advertise | Privacy | Mobile
Web02 | 2.8.140921.1 | Last Updated 27 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100