3
Answers

Data base record fetching

Danish Habib

Danish Habib

10y
622
1
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)