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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

decimals to INT

Status
Not open for further replies.

iainrkemp14

IS-IT--Management
May 13, 2003
26
US
Hi all,

I have atable full of data, a lot of which is decimals (ie, 1.423). Does anyone know a solution for changing all this data to whole numbers - perhaps an update query or something? Ideally I would like to round everything to the nearest whole number.

Cheers,

- Iain
 
UPDATE YourTable
SET f1 = ROUND(fi), f2 = ROUND(f2), f3 = ROUND(f3);

where YourTable is the name of your table and
f1, f2, f3 are names of fields you want to round.

I suggest you back up your table before you do this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top