The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

SQL question

DeebaserDeebaser on my way to work in a suit and a tieAhhhh...come on fucking guyRegistered User regular
edited June 2010 in Help / Advice Forum
I have a field stored as a float that needs to be presented as currency. The problem is transact SQL doesn't seem to recognize 'double'. Is there an easy work around for this?

It needs to be shipped before I go home, because the dude needs this tomorrow AM in the UK.

Deebaser on

Posts

  • solsovlysolsovly Registered User regular
    edited June 2010
    Convert the float (cast)
    http://msdn.microsoft.com/en-us/library/ms187928.aspx
    Do you need the currency symbol? If so, you will need to cast again to varchar.

    solsovly on
  • DeebaserDeebaser on my way to work in a suit and a tie Ahhhh...come on fucking guyRegistered User regular
    edited June 2010
    Thanks Sol,

    I wound up converting my final select to decimal(15,2)
    I'm sure they'd love the currency symbol, but we don't have a table with that stored and this report has about a dozen different currencies....so....yeah....fuck it.

    Deebaser on
Sign In or Register to comment.