In the script below I can't get the where clause in the "Retention Customer" table to work.
The variable vRetentionDateProduction = 1/1/2013.
If I hard code into my where clause: WhereProdGLMonth <= makedate(2013,01,01) it works fine. But for some reason it won't intepret the variable (vRetentionDateProduction) accurately. Am I doing something wrong? Production_MaxDate: LOAD Max(Date([ProdGLMonth])) asvRetentionDateProduction Resident Production;
If your default date format is set correctly, quoting the variable should also work here (because QV then can interpret your string as date number, which is expected by the date functions year() and month():