Danish Habib

Danish Habib

  • NA
  • 694
  • 245.7k

Data base record fetching

Dec 28 2014 8:05 AM
dear below is the query 


SELECT SUM(CAST(CAST(QT.QuestionTarget AS FLOAT)AS INT))  AS Indicator01Target ,SUM(CAST(CAST(A.Question01Total AS FLOAT)AS INT))   AS Achievement  from QuestionTarget  QT
 inner JOIN Answers AS A ON A.Question01=QT.Question_ID  
 Where QT.Question_ID=1


The problem is that My I have Two Tables 
1-QuestionTarget
2-Answer 
My Indicator01Target is also in Answer table instead of getting its value form QuestionTarget table it is getting its value from Answer Table 

Answers (3)