I'm not sure this will help much but...
(ps dbo.fn_eroundfactor returns the number of places to round by)
ALTER procedure [dbo].[sp_NGprices_DONGd](@dongpriceindex varchar(32))
as begin
declare @pricemonth datetime
declare @priceday datetime
declare @surrogate int
declare @Iindex varchar(32)...
Hi, I'm getting some strange answers when using round().
If I just use a single query select round(20.6348035,6) correctly rounds up and returns 20.634804. However when called as part of a stored procedure round(20.6348035,6) rounds down and returns 20.634803. Has anyone got any idea why...
Yeah, also tried this but whilst it worked for this example it fails for others (eg fn_round(1.12345678)=1.123456):
create function fn_roundup(@num decimal(38,33),@dp int)
returns decimal(38,33)
as begin
if @dp <0 set @dp=0
return @ceiling(@num*power(10,@dp)) / power(10,@dp)
end
Hi,
I have to re-create in SQL a custom Excel function which rounds numbers to 8 significant figures (because thats how many digits can be shown on a calculator!). I can work out the number of decimal points correctly but the round() function then rounds down when called in a procedure instead...
Tried replacing " " with "" but of course you just end up gibberish like "Buyersshallexercisereasonableeffort" and the chr(10) and chr(13) replacements have no effect.
Trimming was my first thought, but do subreports generally resize with the length of the text? I'm worried that they don't and...
The Xtal report shows all clauses for a contract with a subreport that show each contract clause. This subreport consists of a single field - 'clausetext' of type varchar(1024).
But...each clausetext can be of different length. How can I eliminate the whitespace at the end of each clause so...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.