Thanks, that was simple enough...guess I just couldnt think of that.

Thanks again!
-Nick

Gordon said:
> Try round(value*4,0)/4
> Worked on the samples I tried
>
>> -----Original Message-----
>> From: Nicholas Stuart [mailto:[EMAIL PROTECTED]]
>> Sent: Tuesday, July 23, 2002 1:47 PM
>> To: [EMAIL PROTECTED]
>> Subject: rounding?!
>>
>> Ok here's the problem. Trying to write a select statement to be able
> to
>> round a set of numbers to the nearest quarter of an inch. Here is what
> I
>> have so far:
>>
> *-----------------------------------------------------------------------
> --
>> *
>> SELECT
>> CONCAT(ROUND(inside_length + (wall_thickness * 2), 0),'\'-',
>> mod(((inside_length + (wall_thickness * 2)) * 12), 12),'\" x ',
>> ROUND(inside_width + (wall_thickness * 2), 0),'\'-',
> mod(((inside_width +
>> (wall_thickness * 2)) * 12), 12),'\"' ) AS footprint,
>> CONCAT(ROUND(inlet_invert - inlet_sump - base_slab_thck, 2), '\'') as
>> outside_Bottom_Elevation,
>> CONCAT(inlet_invert, '\'') as inlet_invert,
>> CONCAT(outlet_invert, '\'') AS outlet_invert,
>> CONCAT(TopofTank, '\'') AS TopOfTank,
>> CONCAT(Rim, '\'') as Rim,
>> CONCAT(ROUND(((inlet_Sump + base_slab_thck) - (((inlet_ko_dia -
> inlet_dia)
>> / 2) / 12)) * 12, 1), '\"') AS inlet_ko_outside,
>> CONCAT(ROUND(((outlet_Sump + base_slab_thck) - (((outlet_ko_dia -
>> outlet_dia) / 2) / 12)) * 12, 1), '\"') AS outlet_ko_outside,
>> CONCAT(ROUND((inlet_Sump + base_slab_thck) * 12, 1), '\"') as
>> inlet_invert_outside,
>> CONCAT(ROUND((outlet_Sump + base_slab_thck) * 12, 1), '\"') as
>> outlet_invert_outside,
>> CONCAT(ROUND(inlet_Sump * 12, 1), '\" ') AS inlet_Sump,
>> CONCAT(ROUND(outlet_Sump * 12, 1), '\"') AS outlet_Sump,
>> CONCAT(ROUND(inlet_Sump * 12 + (inlet_dia / 2), 1), '\"') AS
>> inlet_cl_floor,
>> CONCAT(ROUND(outlet_Sump * 12 + (outlet_dia / 2), 1), '\"') AS
>> outlet_cl_floor,
>> CONCAT(inlet_dia, '\"') AS inlet_dia,
>> CONCAT(outlet_dia, '\"') AS outlet_dia,
>> CONCAT(inlet_ko_dia, '\"') AS inlet_ko_dim,
>> CONCAT(outlet_ko_dia, '\"') AS outlet_ko_dim,
>> CONCAT(ROUND((inlet_ko_dia - inlet_dia) / 2, 1), '\"') AS
>> inlet_invert_ko_invert,
>> CONCAT(ROUND((outlet_ko_dia - outlet_dia) / 2, 1), '\"') AS
>> outlet_invert_ko_invert,
>> CONCAT(inlet_offset, '\"') AS inlet_offset,
>> CONCAT(outlet_offset, '\"') AS outlet_offset
>> FROM tbl_prj_dims
>>
> *-----------------------------------------------------------------------
> --
>> *
>>
>> This will get all of the values I need in decimal inches but I would
> like
>> to be able to round them up or down to the nearest quarter of an inch,
> so
>> the only decimal values will be .0 or .25 or .5 or .75
>> I'm not really sure if there is efficent way to do it and would like
> all
>> of your inputs.
>> And dont mind the first few values in feet. Those need to be like
> that.
>>
>> Thanks a lot!
>> -Nick Stuart
>>
>> Filter Fodder: MySQL QUERY
>>
>>
>>
>> ---------------------------------------------------------------------
>> Before posting, please check:
>>    http://www.mysql.com/manual.php   (the manual)
>>    http://lists.mysql.com/           (the list archive)
>>
>> To request this thread, e-mail <[EMAIL PROTECTED]> To
>> unsubscribe, e-mail <mysql-unsubscribe-
>> [EMAIL PROTECTED]>
>> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]> To
> unsubscribe, e-mail
> <[EMAIL PROTECTED]> Trouble
> unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to