The statement
SELECT PTY, CITY, ROUND(PEAK *.5, 2), PEAKADJ
FROM U1.Z1
WHERE PEAKADJ > ROUND(PEAK * .5, 2) AND PTY = '32S1'
Gives 2024850.840 in Sqlserver Management Studio, but gives 2024850.83 in TD.
Why would this happen?
Round off difference - Sqlserver
Round off difference - Sqlserver
You do not have the required permissions to view the files attached to this post.
Re: Round off difference - Sqlserver
Same problem with TD 7.
Re: Round off difference - Sqlserver
Hi,
have you tried to replace :nFactor through 0.5 ? instead of ?
Regards Thomas
have you tried to replace :nFactor through 0.5 ?
Code: Select all
@ROUND(PEAK * .5, 2)
Code: Select all
@ROUND(PEAK * :nFactor, 2)
Regards Thomas
Re: Round off difference - Sqlserver
Tried that - no difference:
!!CB!! 174
Set sSelect = "SELECT CITY, MARGINADJ, ( (PEAK* " || SalNumberToStrX( nFactor, 2 ) || ") ) - PEAKADJ
INTO :sCityCode, :nSpanMarginCollected, :nPeakShort
FROM " || sgSchema || "Z1
WHERE PTY = :sPartyCode AND CITY = :sCityCode AND PEAK - PEAKADJ > 0"
-------------------------
Evaluates to:
String: SELECT CITY, MARGINADJ, ( (PEAK* 0.50) ) - PEAKADJ
INTO :sCityCode, :nSpanMarginCollected, :nPeakShort
FROM U1.Z1
WHERE PTY = :sPartyCode AND CITY = :sCityCode AND PEAK - PEAKADJ > 0
!!CB!! 174
Set sSelect = "SELECT CITY, MARGINADJ, ( (PEAK* " || SalNumberToStrX( nFactor, 2 ) || ") ) - PEAKADJ
INTO :sCityCode, :nSpanMarginCollected, :nPeakShort
FROM " || sgSchema || "Z1
WHERE PTY = :sPartyCode AND CITY = :sCityCode AND PEAK - PEAKADJ > 0"
-------------------------
Evaluates to:
String: SELECT CITY, MARGINADJ, ( (PEAK* 0.50) ) - PEAKADJ
INTO :sCityCode, :nSpanMarginCollected, :nPeakShort
FROM U1.Z1
WHERE PTY = :sPartyCode AND CITY = :sCityCode AND PEAK - PEAKADJ > 0
Who is online
Users browsing this forum: [Ccbot] and 8 guests