Forum Discussion
Inserting empty rows
- Feb 04, 2021
Clayton_cramer If you don't like IIF, then use IN:
SELECT year, Abs(Sum([cause_ID] In (15, 16))) AS incidents FROM Table2 GROUP BY year;
IIF needs an expression and two values for TRUE and FALSE evaluations of the expression. It should return a single VALUE and SUM should add all those values for all rows. What you provided makes perfect sense--except to Access, which is still complaining about wrong number of arguments. It is almost like IIF does not recognize that expression.
Clayton_cramer If you can, I would like some sample data to work with in order to see what might the problem is. Thanks.
BTW. Access most definitely will evaluate the expression once it is properly written, so please include your query with that expression with the sample data. Thanks.
- George_HepworthFeb 02, 2021Silver Contributor
Clayton_cramer If you can, compress it into a ZIP file and see if that will upload. If not, we can try an alternate method.
- Clayton_cramerFeb 02, 2021Copper Contributor
George_HepworthI tried attaching the database:
Correct the highlighted errors and try again.
- The attachment's massmurder.accdb content type (application/msaccess) does not match its file extension and has been removed.
- Clayton_cramerFeb 02, 2021Copper Contributor
I am embarrassed to say that I cannot figure out how to export my database with just a few records in it, so it is a size that I can upload.