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.
| Author |
Topic |
|
dirwin26
Yak Posting Veteran
81 Posts |
Posted - 2005-10-21 : 14:01:32
|
| can anyone see why I would be returning a NULL value for this correlation? SELECT (COUNT(*)*SUM(x.Sret*y.SlopeDDX)-SUM(x.Sret)*SUM(y.SlopeDDX))/( SQRT(COUNT(*)*SUM(SQUARE(x.Sret))-SQUARE(SUM(x.Sret)))* SQRT(COUNT(*)*SUM(SQUARE(y.SlopeDDX))-SQUARE(SUM(y.SlopeDDX)))) correlationFROM #res x JOIN #res y ON x.Sret=y.SlopeDDXCheers,Dave |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
rockmoose
SQL Natt Alfen
3279 Posts |
Posted - 2005-10-21 : 14:41:26
|
| Do your columns Sret, SlopeDDX allow NULL ?_______________________I have null problems...rockmoose |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-10-21 : 14:41:40
|
you have division by zero somewhere?Go with the flow & have fun! Else fight the flow |
 |
|
|
dirwin26
Yak Posting Veteran
81 Posts |
Posted - 2005-10-21 : 14:48:34
|
| Both allow NULL's and there are no zeros.....Dave |
 |
|
|
rockmoose
SQL Natt Alfen
3279 Posts |
Posted - 2005-10-21 : 14:51:48
|
| >> Both allow NULL'sDon't.____________________I have null problems...rockmoose |
 |
|
|
|
|
|