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

Query output places minus signs 1

Status
Not open for further replies.

mraetrudeaujr

Technical User
Dec 20, 2004
137
US
I have an SQL query that puts a 'minus' sign in front of the numbers in the datasheet output. It doesn't do it for the number zero (0) only the whole numbers (1,2,3,4, etc). How can I get rid of this? I created a report and (of course) it shows the numbers as -2, -34, -16, etc. I need to get rid of this when I produce my reports. For my purposes I know that this is just an erroneous symbol, but for management it is confusing. Here is the SQL code:

Code:
SELECT [STATION], Sum([OLD_1326_VIOLENT_FELON]) AS [OLD 1326 VIOLENT FELON], Sum([OLD_1326_REPEAT_FELON]) AS [OLD 1326 REPEAT FELON], Sum([OLD_1326_TRIPLE_FELON]) AS [OLD 1326 TRIPLE FELON], Sum([OLD_1326_SUPERVISED_RELEASE]) AS [OLD 1326 SUPERVISED RELEASE], Sum([MEETS_OLD_CASID]) AS [OLD CASID]
FROM [tbl_CRIMINAL CASE TRACKING]
WHERE STATION Is Not Null
GROUP BY [STATION] 
UNION ALL SELECT "Total", Sum([OLD_1326_VIOLENT_FELON]), Sum([OLD_1326_REPEAT_FELON]), Sum([OLD_1326_TRIPLE_FELON]), Sum([OLD_1326_SUPERVISED_RELEASE]), Sum([MEETS_OLD_CASID])
FROM [tbl_CRIMINAL CASE TRACKING]
WHERE STATION Is Not Null;

As always, any help is greatly appreciated. Thanks.
 
Replace all your Sum(...) by Abs(Sum(...))

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

Part and Inventory Search

Sponsor

Back
Top