I have the following Query written in MS SQL Server:
select
(select (CAST( count(*) as decimal (38,4))) from Inventor) /
(select (CAST( count(*) as decimal(38,4))) from General);
which works perfectly, but when I try to use it in Access it doesn't work at all.
Help please!
Ok so it doesnt have to be cast as decimal, a float would work as well.
My Inventor table has the PK from the General table as a FK in it. The issue is that if something has multiple inventors listed on it. So i Tried the following:
SELECT TotalInventors/TotalPatents
(SELECT COUNT (DISTINCT PatentNo) FROM Inventor AS TotalPatents
(SELECT COUNT (*) FROM Inventor AS TotalInventors))
FROM Inventor;
Still with a syntax error