The following query refuses to work on Sql server whereas it runs fine on Oracle 10gR2.
SELECT COUNT(*)
FROM (
SELECT count(*)
FROM MYTABLE
WHERE id IS NOT NULL
GROUP BY id
)
It ends up with this message :
Microsoft OLE DB Provider for SQL Server error '80040e14'
Ligne 7 : syntaxe incorrecte vers ')'.
How can I make it compatible for both DBMS ?