Click here to Skip to main content
12,620,900 members (35,346 online)
Rate this:
 
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 21:42pm
Code-Hunt7.1K
Comments
Abhijit Parab 27-Sep-12 2:51am
   
just give one example, it is not clear from given question
snehasish nandy 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 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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.161128.1 | Last Updated 27 Sep 2012
Copyright © CodeProject, 1999-2016
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