|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
are there know problems with calculation errors in recursive function in sql server 2000 ?
if not, please point out the error in the following: PHP Code:
select dbo.func_recverkoopprijs_basis(25,5) as p this returns 4193 (wrong because this is supose to be 4220) Reason why: select Actuele_Verkoopprijs * Aantal from view_Full_Lijnen where Parent_ID=25 AND Versie_ID=5 returns: 400.0000 270.0000 250.0000 3300.0000 THEN: select sum(Actuele_Verkoopprijs * Aantal) from view_Full_Lijnen where Parent_ID=25 AND Versie_ID=5 returns: 4220 (this is right) EVEN: select sum(Actuele_Verkoopprijs * Aantal)*(1-(select discount from view_Full_Lijnen where lijn_ID=25 AND Versie_ID=5)) from view_Full_Lijnen where Parent_ID=25 AND Versie_ID=5 returns: 4220 (still right) And yet the salst statement should do the exact same thing the function does anyone any clue ![]() |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > Calculation errors or MS bug in recursive functions ?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|