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

Formatting a double number in a query 1

Status
Not open for further replies.

robojeff

Technical User
Dec 5, 2008
220
US
I have a query that is pulling a number from a "read only" table which is set up in the table as a double data type.

In one instance, the number is 0.590 but is stored in the table as 590, so I set my query to calculate numbers in this field to be:

Code:
Qty: ([QTY]/1000)

and in this case, my query reports this value as 0

How can I "type cast" my query to pull in the actual value
of 0.590 (with 3 places to the right of the decimal point)?

Thanks
 
Simple Format statement will force (3) digits. htwh...

Code:
SELECT Table1.F1 AS Orig_Val, Format([F1]/1000,"0.000") AS New_Val
FROM Table1;

Steve Medvid
IT Consultant & Web Master

Chester County, PA Residents
Please Show Your Support...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top