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

Remove Negatives from my results?

Status
Not open for further replies.

djmousie

Technical User
Oct 10, 2001
164
US
How would i go about removing negative values that I have in a table? I only care about the actual whole number. Is there some type update or criteria I can use?

 
Hi

If you simply want to ignore the sign you could use ABS() function, if you want to change the negatives to positives (leaving the positives as they are), you could make an update query with a criteria of < 1 and use Abs() to set negatives to positives

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
How would I go about writing the update query? My criteria would be less than <1, but what would i put in the &quot;Update to&quot; field? I'm not sure where i would need place the ABS function in that case?
 
Use an update query like

UPDATE tbl SET Field1 = Abs(Field1) WHERE Field1 < 0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top