Rabu, 07 Maret 2012

RE: [MS_AccessPros] Using "Nz" in place of "Is Not Null"

 

Robin-

No NZ needed. Your third query is wrong:

UNION SELECT DISTINCT RFEMembers.Email3 AS Email, "Validated Member"
AS FullName, 1 AS ReadOnly, 0 AS PostOnly, 0 AS Digest
FROM RFEMembers
WHERE (((RFEMembers.Email3) Is Not Null));

Test Email3, not Email2.

John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Nashua, NH)

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Robin Chapple
Sent: Wednesday, March 07, 2012 9:59 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Using "Nz" in place of "Is Not Null"

I am using Access 2007 on a Windows 7 system.

I am still unclear how to properly us the "Nz" operator.

I have this SQL which provides me with a single record without an
email address. How should I apply the "Nz" function?

SELECT DISTINCT RFEMembers.Email, "Validated Member" AS FullName, 1
AS ReadOnly, 0 AS PostOnly, 0 AS Digest
FROM RFEMembers
WHERE (((RFEMembers.Email) Is Not Null));

UNION SELECT DISTINCT RFEMembers.Email2 AS Email, "Validated Member"
AS FullName, 1 AS ReadOnly, 0 AS PostOnly, 0 AS Digest
FROM RFEMembers
WHERE (((RFEMembers.Email2) Is Not Null));

UNION SELECT DISTINCT RFEMembers.Email3 AS Email, "Validated Member"
AS FullName, 1 AS ReadOnly, 0 AS PostOnly, 0 AS Digest
FROM RFEMembers
WHERE (((RFEMembers.Email2) Is Not Null));

Many thanks,

Robin Chapple

------------------------------------

Yahoo! Groups Links

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar