Re: Measurement conversion
From: Adam Machanic (amachanic_at_hotmail._removetoemail_.com)
Date: 08/25/04
- Next message: MarcusW: "Set DateFirst 1, context .. can I make this global and permanent ?"
- Previous message: Adam Machanic: "Re: Measurement conversion"
- In reply to: Steve T.: "Measurement conversion"
- Next in thread: TornariTech: "Re: Measurement conversion"
- Reply: TornariTech: "Re: Measurement conversion"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 25 Aug 2004 17:50:18 -0400
Oops, hit send too quickly last time...
This will round up the calculation if the precision of the number of feet is
greater than 0.0009; else, it will round down... If you want to make it
round up more often, just change the 0.499:
SELECT Orderid, Bundlename, PanelID, Linenumber,
ROUND((Height/12.0) + 0.499, 0) AS Height,
ROUND((Length/12.0) + 0.499, 0) AS 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
"Steve T." <stornari@nvrinc.com> wrote in message
news:OhQVqwuiEHA.3896@TK2MSFTNGP15.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.
>
>
- Next message: MarcusW: "Set DateFirst 1, context .. can I make this global and permanent ?"
- Previous message: Adam Machanic: "Re: Measurement conversion"
- In reply to: Steve T.: "Measurement conversion"
- Next in thread: TornariTech: "Re: Measurement conversion"
- Reply: TornariTech: "Re: Measurement conversion"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|