Our new Indie Games subforum is now open for business in G&T. Go and check it out, you might land a code for a free game. If you're developing an indie game and want to post about it, follow these directions. If you don't, he'll break your legs! Hahaha! Seriously though.
Our rules have been updated and given their own forum. Go and look at them! They are nice, and there may be new ones that you didn't know about! Hooray for rules! Hooray for The System! Hooray for Conforming!

SQL question

DeebaserDeebaser Way out in the waterSee it swimmin'?Registered 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
#FreeThan
#FreeScheck
#FreeSKFM

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.

    XBOX Live Tag: Solsovly
  • DeebaserDeebaser Way out in the water See it swimmin'?Registered 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.

    #FreeThan
    #FreeScheck
    #FreeSKFM
Sign In or Register to comment.