select A.QuestionTarget AS QTARGET,B.Question01Target,B.Question01Total
from QuestionTarget A INNER JOIN Answers B ON B.Question01=A.Question_ID
where A.Question_ID = B.Question01
It gives me two rows it gives me correct record set from First table and first row but in second row i do not have values there but due to the same id it insert the same rows record into the second row as well may b due to inner join what should i do
It gives me two rows it gives me correct record set from First table and first row but in second row i do not have values there but due to the same id it insert the same rows record into the second row as well may b due to inner join what should i do


Piyush PansuriyaRank #454 · 5.5K reputationPosted Dec 29, 2014, 2:28 AM EST
Try LEFT OUTER JOIN between these tables and remove WHERE clause.
Vikram AgrawalRank #4,713 · 329 reputationPosted Dec 29, 2014, 2:41 AM EST
Just remove the where clause and you will get desired result
Harieswaran DRank #1,389 · 1.2K reputationPosted Dec 29, 2014, 5:14 AM EST
Danish HabibRank #2,024 · 715 reputationPosted Dec 29, 2014, 6:03 PM EST
Danish HabibRank #2,024 · 715 reputationPosted Dec 29, 2014, 6:03 PM EST