Click here to Skip to main content
15,920,217 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,

Good Moring to all.

I am again with new problem

there are four tables.

1. tblQuestion

columns
i. QuestionID
ii. Question


2. tblAnswerChoice

Columns
i. AnswerChoiceID
ii. QuestionID
ii. AnswerChoice


3. tblTag

Columns
i. TagID
ii. Tag

4. tblTagQuestion

columns
i.TagQuestionID
ii.QuestionID
iii. TagID

I have one search button which search the all tags stored in the database and show all the question and answer choices of the question related to that tag.

Main problem is that tag is stored in tblTag, Question is stored in tblQuestion and answer choices are stored in tblAnswerChoice.

now the problem is that I want to show the Question and Choices according to there Tag Name. Mainly my requirement is to show Question and AnswerChoice which are of same Tag Name. But the Tag Name is sotored in the tblTag.
To the show the desired output I have to use all the four tables but how.

Thnaks,
Deepak
Posted
Updated 1-Oct-11 7:13am
v2
Comments
André Kraak 1-Oct-11 3:20am    
What have you tried yourself?
Share any code you tried and describe what you are having trouble with.

If you wish to change your question use the Improve Question button.

Have a look at how the JOIN[^] statement works.
 
Share this answer
 
Could you define your problem with more explanations?
 
Share this answer
 
Comments
Simon Bang Terkildsen 1-Oct-11 10:28am    
You should post this as a comment to the question not as a solution.

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