Which data type store unit cost price and amount in sqlserver 2012?

  • In sql server 2012 I design database for pharmaceutical company to store data of 

    orders

    Inside this database I have Table order inside it have three fields

    Quantity

    Unit Cost price

    Amount( Quantity * Unit Cost price)

    Quantity datatype is integer

    What data type i can use for Unit Cost price field and Amount field ?

    Amount will be big because production Qunatity from 200000 to 1000000 box in order .

    Unit cost price from 1 pound to 200 pound .

    so that Which data type store unit cost price and amount in sqlserver 2012?

  • Did you look up the difference between SMALLMONEY and MONEY datatypes? MONEY should work fine.

  • Thank you for reply
    I doubt between two datatype decimal or money
    which is best and if i use decimal what value i use
    decimal(?,?)
    what i use in question mark above
    please help me

  • Did you look up the differences between DECIMAL, MONEY, and SMALLMONEY?

  • i ask about what is suitable to my case decimal or money

  • ahmed_elbarbary.2010 - Sunday, May 21, 2017 4:25 AM

    i ask about what is suitable to my case decimal or money

    What are the smallest and largest values you anticipate? Include decimals in your reply.


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • The reason people are asking you questions about your data and referring you to data types is that we don't know your data.  The data type determines precision and range of values.  Because you know your data and we don't, you're the one who's qualified to make the decision.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply