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!

Crosstab Rounding issue

Status
Not open for further replies.

Moxy1

Programmer
Aug 29, 2002
75
US
I'm writing a Crosstab and the problem that I've run into is my total column shows a repeating decimal even though there are only 2 decimal places on my field. I've tried converting the field to currency, double even tried to run a trim on the field all with the same results. Any idea?
 
Any idea?
Without seeing your SQL code, no.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
it is fairly straight foward:

TRANSFORM Sum(tblReturnBalance.ret_amount) AS SumOfret_amount
SELECT tblReturnBalance.ret_branch, tblReturnBalance.ret_client_no, tblReturnBalance.ret_client_name, Sum(tblReturnBalance.ret_amount) AS [Total Of ret_amount]
FROM tblReturnBalance
GROUP BY tblReturnBalance.ret_branch, tblReturnBalance.ret_client_no, tblReturnBalance.ret_client_name
PIVOT tblReturnBalance.ret_description;
 
You may try this:
TRANSFORM [!]Round([/!]Sum(tblReturnBalance.ret_amount)[!],2)[/!] AS SumOfret_amount
SELECT tblReturnBalance.ret_branch, tblReturnBalance.ret_client_no, tblReturnBalance.ret_client_name, [!]Round([/!]Sum(tblReturnBalance.ret_amount)[!],2)[/!] AS [Total Of ret_amount]
FROM tblReturnBalance
GROUP BY tblReturnBalance.ret_branch, tblReturnBalance.ret_client_no, tblReturnBalance.ret_client_name
PIVOT tblReturnBalance.ret_description

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top