|
-
Feb 15th, 2010, 12:23 PM
#1
Thread Starter
Member
Count(*) does not work for null values
hi,
i m trying to run a query on an MSAccess table, but it does not give me any count but only 0.
There are 3 null values which i should be getting but it does not give me the result. This query works perfectly in MSSql Server 2008.
the query is :
SELECT COUNT(*) AS Cntr
FROM (Modul m LEFT OUTER JOIN
Relation r ON m.Mod_Name = r.von)
WHERE (m.[group] = '')
I need a workaround for this but am unable to find one. Any help would be most appreciated.
Last edited by sifar786; Feb 15th, 2010 at 12:27 PM.
-
Feb 15th, 2010, 01:57 PM
#2
New Member
Re: Count(*) does not work for null values
IF you can get it to work by creating a query in MS Access, you can then open that query in "SQL View" and it will spit it out for you. I don't know if Access has a count function though.
Good luck
-
Feb 15th, 2010, 03:49 PM
#3
Thread Starter
Member
Re: Count(*) does not work for null values
I did not understand what you meant.
Though i found a workaround for it:
Code:
SELECT COUNT(*)-1 AS Cntr
FROM (Modul m LEFT OUTER JOIN
Relation r ON m.Mod_Name = r.von)
WHERE (m.[group] = '') or (m.[group] IS NULL)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|