Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

field data types?

Status
Not open for further replies.

aspnetuser

Technical User
Sep 9, 2004
273
US
I need to store hours field in sql server 2000. What data type should i use?

I need to store values like 4.25
4.50
etc...

please advise?
 
You may be better off storing minutes in an integer field. It's also possible that a datetime field would be better. It really depends upon what accuracy you need and what the overall purpose of the column is.
-Karl

[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
 
just to store decimals

4.5
4.25

i tried numberic
scale = 2

is that ok

 
? Is it ok with you? What will you store if the number is 1 hour and 20 minutes?
-Karl

[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top