Answers for "sql server isnull function nor working count"

SQL
0

sql server isnull function nor working count

SELECT  FirstName, 
        LastName,
        IsNull((
            SELECT  COUNT(UP1.EmailAddress) AS HasEmail 
            From    dbo.UserProfiles AS UP1 
            WHERE   (NOT (UP1.EmailAddress IS NULL)) 
                    AND (CreatedBy = dbo.UserProfiles.UserID)
            GROUP BY CreatedBy), 0) AS EmailEnteredCount 
FROM    dbo.UserProfiles 
WHERE   (IsStaff = 1)
Posted by: Guest on August-02-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language