Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Select query my records repeating twice

Author  Topic 

cplusplus
Aged Yak Warrior

567 Posts

Posted - 2011-04-06 : 10:01:49
I am using the following select query, but my taskid's are repeating twice, can you please tell me what am i doing wrong:

select t.Contractid,t.taskid,(t.PctComplete/100.0)*(isnull(t.award_amt,0) + isnull(c.amount,0)) TskEV from tab_tasks t inner join TAB_CostDetails c on (t.taskid = c.taskid and t.Contractid=119) where t.Contractid=119

Thank you very much for the helpful info.

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2011-04-06 : 10:20:12
I'm willing to bet that there is more than 1 record in TAB_CostDetails for each taskId...


Corey

I Has Returned!!
Go to Top of Page
   

- Advertisement -