Hey,
I am using ArcMap 10.5 with a table within our Enterprise SDE that has a join to a view (also in the SDE). This view has a date field that I would like to use to filter my data on. I need to find rows that were inspected in the past 90 days.
INS_DATE field properties:

An sample of my data:
| tbl1.ObjectID | tbl1.AssetID | tbl1.Shape() | tbl2.AssetID | tbl2.INS_DATE |
|---|
| 1 | 10000 | | 10000 | 3/02/2016 11:34:52 AM |
| 2 | 10001 | | 10000 | 29/11/2017 8:37:12 AM |
| 3 | 10002 | | 10000 | 29/11/2017 1:45:23 PM |
So I want to limit my rows to ones that have an INS_DATE within the past 90 days.
I have been trying to use the below code (and about a dozen variables of it) all give a non-descriptive error:
SDE_SPATIAL<SPAN class="punctuation token">.</SPAN>GISADMIN<SPAN class="punctuation token">.</SPAN><SPAN class="operator token">%</SPAN>AUDITS_LATEST_RECORD<SPAN class="punctuation token">.</SPAN>INS_DATE <SPAN class="operator token">></SPAN> <SPAN class="punctuation token">(</SPAN>GetDate<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">-</SPAN> <SPAN class="number token">90</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>

Is there another way I should be approaching this one?
NathanDuncan FYI
Cheers
Ben