Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Using the TO_CHAR function in a SQL statement

Re: Using the TO_CHAR function in a SQL statement

From: Bricklen Anderson <bricklen_at_shaw.ca>
Date: Sun, 26 May 2002 20:54:46 GMT
Message-ID: <3CF14AA7.81C422A2@shaw.ca>


why use the to_char function? why not rewrite it as so:

SELECT item_id,'$'||round(sum(price * qoh),2) "Inv. Value" FROM inventory
GROUP BY item_id;

jkutey_at_nospam.nycap.rr.com wrote:
>
> Here is my query:
>
> select item_id, sum(price*qoh) "Inv. Value"
> FROM inventory
> group by item_id;
>
> How would I write this query using the TO_CHAR function to format the
> number values using a currency format masked with two decimal places?
>
> Thanks
> John
Received on Sun May 26 2002 - 15:54:46 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US