Check null in MS Access request

In SQL Server, we can use the IsNull () function to check if the value of an expression is null or not. For instance,

Select IsNull(sum(amount),0) as TotalAmount
  From Payments 

Similarly, there is some function in the MS Access request for checking a null value. I need the same statement that will be executed in the request for access to MS Access.

Can I specify a replacement for IsNull()in MS Access.

Thank you for sharing your time.

+3
source share
3 answers

To a large extent, the equivalent in Access is the nz function .

There's a good page on how to use it here .

, Access , , Jet , nz .

+6

Jet/ACE, :

SELECT IIf(Sum(amount) Is Null, 0, Sum(amount)) AS TotalAmount
FROM Payments

#, Is Null IIf Jet/ACE. Is Null ( , ).

IIf Is Null Nz, Nz :

  • , ( )
  • ; Nz Variant, Jet/ACE ( , , , ..).

UPDATE: Allen Browne IIf, Nz, IsNull() Is Null. , . , , , .

+10

,

.....ORDER BY TRANSDATE ASC,(IIf([PaymentTime] Is Null, '23:59:59', [PaymentTime])) DESC
0

Source: https://habr.com/ru/post/1788470/


All Articles