We help IT Professionals succeed at work.

Input of numeric data into a field w/datatype of float

TimSweet220
TimSweet220 asked
on
253 Views
Last Modified: 2010-03-20
I need a way to update a field in a table with a numeric number.  The field (Hours) has a datatype of "float"  so if were to update this field like so

Update Issues
set hours = '4.0'
where issuenumber = 'xxxx'

I get a displayed number that doesn't resemble the intended 4.0 hours.

So I'm looking perhaps for a sql function that will take the 4.0 hours and convert and imput them into the database so that when displayed shows the 4.0 hours.

Any help will be appreciated.

Comment
Watch Question

What DBMS?

Typically, omit the quotes around a number.

Update Issues
set hours = 4.0
where issuenumber = 'xxxx'

Author

Commented:
MS SQL 2000

The display is in asp and when I run the query above
 the asp page displays  96:00 instead of 4:00

Now if entered through the asp display for example 88 hours the database shows 3.6666666666666665.  So I guess the asp is doing the converting when updating to the database.

I may have to take this off to another section - but I was hoping to be able to update on the dbside rather then enter by hand in the asp pages.


Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.