Hello Everyone,
I am unable to query my rest service on following where clause:
"CLEAR_STATUS <> 'P' AND MONTH(INSPECT_DATE)=5 AND YEAR(INSPECT_DATE)=2015"
Can able to use in ArcGIS 10 earlier, Please help how can i query month and year specifically on date column using ESRI server 10.2.2
Any help will be appreciated,
Thanks and Regards
Solved! Go to Solution.
Saurabh,
You may also wan tot try this SQL statement:
CLEAR_STATUS <> 'P' AND INSPECT_DATE BETWEEN '2015-5-01' AND '2015-05-31'
Saurabh,
When you go to your rest end point for this particular layer of your map service do it say:
Supports Advanced Queries: true
Saurabh,
You may also wan tot try this SQL statement:
CLEAR_STATUS <> 'P' AND INSPECT_DATE BETWEEN '2015-5-01' AND '2015-05-31'
Hi robert,
Thanks for your quick response. I will be trying advanced to true when tmrw i back to work.
Also, as per your second reply i cannot use between beacuse i want to query this column for month only and there is another column for year . Please check my query which i have posted.
Thanks and regards
Sent from my iPhone
Saurabh,
Hmm... your query indicates that both the month and year are part of the same date field...
CLEAR_STATUS <> 'P' AND MONTH(INSPECT_DATE)=5 AND YEAR(INSPECT_DATE)=2015
i want to query this column for month only and there is another column for year
Hi robert,
My bad , thanks for resolving this...
Regards
Saurabh