Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. johnnymagee69

    Rounding in functions

    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)...
  2. johnnymagee69

    Rounding in functions

    Hi bborisov, I wasnt using a 3rd parameter. I just tried this but it still rounds down regardless of whether the 3rd parameter is 0 or 1 .
  3. johnnymagee69

    Rounding in functions

    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...
  4. johnnymagee69

    Round up to 8 sig fig

    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
  5. johnnymagee69

    Round up to 8 sig fig

    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...
  6. johnnymagee69

    Xtal 11 - Trimming varchar

    Aaaaagh. 'Can Grow' in 'Format Field' wasn't ticked. Just had to do that and minimise the details height. Thanks for the help mate.
  7. johnnymagee69

    Xtal 11 - Trimming varchar

    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...
  8. johnnymagee69

    Xtal 11 - Trimming varchar

    Tried that, and trimright as well but it doesnt have any effect - the subreport dimensions dont change on the report.
  9. johnnymagee69

    Xtal 11 - Trimming varchar

    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...

Part and Inventory Search

Back
Top