Wednesday, March 21, 2012

measurement conversion

I am looking for a query that will convert inches into feet:
Here is what I have:
SELECT Orderid, Bundlename, PanelID, Linenumber, Height, Length,
Panelstatus, CompletedDT FROM panel
WHERE completedDT BETWEEN '2004-08-25 06:00' AND '2004-08-25 17:00'
and panelstatus='C'
order by completeddt
The height and Lenght are returned as:
Height Length
93.0 25.375
I want those values returned as feet. I'm seeing that I need to apply *12 to
a delcare statment, but not sure how to format the query.
I do not need to display the inches, just round the total footage up.
any help is appreciated.
Hi,UseROUND ( numeric_expression , length [ , function ] )
Where the numeric_expression is the number you want to round, length is the
number of characters to leave while rounding to the right or left of the
decimal point. If the length is positive, then numbers are rounded to the
right of the decimal point, where as when the length is negative then
numbers are rounded to the left of the decimal point. The function parameter
is optional. This parameter determines whether the ROUND function will round
or truncate the numeric_expression. If the function parameter is a zero (0),
the default, then rounding will occur; any other value for this parameter
will cause the ROUND function to truncate the numeric_expression.
SELECT Orderid, Bundlename, PanelID, Linenumber, Round(Height,0),
Round(Length,0) .....
Igor B
"Steve T." <stornari@.nvrinc.com> wrote in message
news:OK0ArxuiEHA.3172@.tk2msftngp13.phx.gbl...
>I am looking for a query that will convert inches into feet:
> Here is what I have:
> SELECT Orderid, Bundlename, PanelID, Linenumber, Height, Length,
> Panelstatus, CompletedDT FROM panel
> WHERE completedDT BETWEEN '2004-08-25 06:00' AND '2004-08-25 17:00'
> and panelstatus='C'
> order by completeddt
> The height and Lenght are returned as:
> Height Length
> 93.0 25.375
> I want those values returned as feet. I'm seeing that I need to apply *12
> to
> a delcare statment, but not sure how to format the query.
> I do not need to display the inches, just round the total footage up.
> any help is appreciated.
>

No comments:

Post a Comment