format a NZ field in a query to 0 decimal places

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have a query which will sometimes return sales vales that are blank, so I
have used a NZ command to return a 0 instead of a blank result:

FD UNITS: NZ([FD UNIT],0)

My problem is that I cannot format this to make the field to no decimal
places, so if a value is returned, I get it to 2 decimal places and I need it
rounded to none.

Any help would be greatly appreciated.
 
Claire

Each field selected in a query can have a Format property applied.
Highlight the column with the field, right-click, and set the Format
property.
 
Claire said:
I have a query which will sometimes return sales vales that are blank, so I
have used a NZ command to return a 0 instead of a blank result:

FD UNITS: NZ([FD UNIT],0)

My problem is that I cannot format this to make the field to no decimal
places, so if a value is returned, I get it to 2 decimal places and I need it
rounded to none.

SELECT pilot_ID,
IIF(earnings_amt IS NULL, CLNG(0), CCUR(earnings_amt)) AS
earnings_value, TYPENAME(earnings_value) AS earnings_value_type
FROM Payroll
 
Back
Top