• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Collapse

You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:

  • You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
  • You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
  • If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

Previously on "Sql Money vs decimal data types"

Collapse

  • lightng
    replied
    Xml data type

    As a contractor, you should be using the xml data type, then when the client complains the app is running slow, convert to decimal or whatever and bill the client double on the strength of the improvements you have made to the app's speed.

    How I miss being a contractor.

    Leave a comment:


  • Durbs
    replied
    Originally posted by DimPrawn View Post
    The question was money type vs decimal.

    Crikey.
    Well i felt it prudent to throw a cheeky Numeric into the mix.
    Last edited by Durbs; 18 December 2009, 15:27.

    Leave a comment:


  • London75
    replied
    The only benefits I can see to money over other data types either custom or base types is 1) It is then very clear regardless of column name what the column was designed to hold and 2) Using financial functions that expect money as inputs, you might find that the type used even if identical in dimensions and content to money gets converted before running through the function leading to performance issues. This may also be the case joining that field to others although you're unlikely to join money columns that frequently.

    Leave a comment:


  • DimPrawn
    replied
    Originally posted by Durbs View Post
    Use Decimal or Numeric

    (they both do the same thing, just choose the name you like best)
    The question was money type vs decimal.

    Crikey.

    Leave a comment:


  • Durbs
    replied
    Use Decimal or Numeric

    (they both do the same thing, just choose the name you like best)

    Leave a comment:


  • AtW
    replied
    If you are planning on storing GBP denominated currencies then I'd recommend you use 64-bit long (bigint) types.

    HTH

    Leave a comment:


  • Sysman
    replied
    Originally posted by wurzel View Post
    Yes, I can't seem to see any great benefit from using money.
    I'm not even talking SQL when I say that I have always found money data types more hassle than they are worth. Currency symbols/mnemonics can be a nightmare, especially where systems have different locale settings; you are better off controlling these yourself.

    Leave a comment:


  • scotspine
    replied
    decimal is the recommended type.

    Leave a comment:


  • wurzel
    replied
    Yes, I can't seem to see any great benefit from using money. It seems to encompass the currency symbol as well as the amount though it doesn't seem to handle different separators. Just as well do as you suggest & get the greater precision through decimal. This way, when I display the value on the page, I guess I'll get the right currency symbol, precision & separator formatting the value using the relevant CultureInfo.

    Leave a comment:


  • Sysman
    replied
    With currencies you might want 5 decimal places anyway

    E.g. xe.com

    Leave a comment:


  • DimPrawn
    replied
    Decimal is more flexible and can hold a greater range and precision.

    Money is actually an integer that is fixed to 4 decimal places and so counts 0.0001, 0.0002, 0.0003 instead of 1,2,3.


    I'd go with decimal or the new vardecimal type.

    http://msdn.microsoft.com/en-us/libr...3(SQL.90).aspx

    Leave a comment:


  • wurzel
    started a topic Sql Money vs decimal data types

    Sql Money vs decimal data types

    Anyone had an experience of handling multiple currencies? Current schema uses decimal (9, 2) so clearly won't handle currencies with 3 decimal places. Is there any advantage using money or smallmoney over say decimal (n, 3) ? Have Googled but results far from conclusive.
Working...
X