Re: Currency Format with Comma Delimination

From: theplantman222 (theplantman222.18ycc1_at_mail.mcse.ms)
Date: 07/06/04

  • Next message: Eric: "Convert from unix time"
    Date: Mon, 5 Jul 2004 22:57:59 -0500
    
    

    Vishal Parkar wrote:
    > *Use CONVERT function to do this.
    >
    > Try something as:
    >
    > SELECT '$'+ CONVERT(VARCHAR(50), money_column, 1) AS column_name
    > FROM <table>
    >
    >
    > --
    > Vishal Parkar
    > vgparkar@yahoo.co.in | vgparkar@hotmail.com *

    This code works, but when I insert the markup that I need (*1.40) I get
    the dollar signs and 4 leading 0's at the end. IE, $4.500000
    How do I get these 0's to drop?? Here is the code

    SELECT Product, [BU/ST], Pack, '$' + CONVERT(VARCHAR(50), UnitPrice
    * 1.40, 1) AS UnitPrice
    FROM dbo.Regional
    ORDER BY Flower

    --
    theplantman222
    ------------------------------------------------------------------------
    Posted via http://www.mcse.ms
    ------------------------------------------------------------------------
    View this thread: http://www.mcse.ms/message728494.html
     
    

  • Next message: Eric: "Convert from unix time"