|
Posted by Hugo Kornelis on 01/11/06 21:38
On 11 Jan 2006 10:13:11 -0800, Erich93063 wrote:
>I am trying to query a table of items There is a field for the name of
>the item, price, quantity etc. When I query I would like to return a
>"total price" which would be price * quantity and alias it out as
>"Total". So something along the lines of:
>
>SELECT vchrItem,
> monPrice,
> intQuanity,
> (monPrice * intQuantity) AS Total,
> ...
>FROM ...
>WHERE intTableID = 12345
>
>Obviously thats NOT how you do it but that is what I am trying to do.
Hi Erich93063,
This is EXACTLY how you do it.
Did you run the code and get an error or incorrect results? If so,
please post more specific information (e.g. the text of the error
message) to help us troubleshoot. See www.aspfaq.com/5006 to find out
what information we need to help you.
--
Hugo Kornelis, SQL Server MVP
Navigation:
[Reply to this message]
|