search table query with BeginDate and EndDate
I have a search table created in my site that have the following query behind it:
SELECT LoggerName, SeriesName, Unit, Date, Value, DataQualifier, LocationName FROM GIS_EDMS.sde.PRECIPITATION_ACCUMULATION WHERE Date >= @FirstDayEntered And Date <= @LastDayEntered
So, as far as I understand, if I enter the FirstDayEntered and the LastDayEntered, the search table should only retrieve values that are inside that date range.
But when I test the search table from the Essentials REST end point and enter a date range, my search table is displaying dates that are not even within the date range specified?

Can someone please comment on this?
Thx...Walter
0
-
Getting this error now:
There was a workflow error running activity: Exception has been thrown by the target of an invocation. Workflow 'EDMS_WF_R1_CLI_1_D' failed Unhandled exception: 'Exception has been thrown by the target of an invocation. The parameterized query '(@BeginDate varchar(8000),@EndDate varchar(8000))SELECT logger_c' expects the parameter '@BeginDate', which was not supplied.' in activity '1.90: SearchTableParameterQuery'. Exception has been thrown by the target of an invocation. The parameterized query '(@BeginDate varchar(8000),@EndDate varchar(8000))SELECT logger_c' expects the parameter '@BeginDate', which was not supplied
But the BeginDate and EndDate are being supplied?
Walter0 -
Hi Walter,
It looks like Essentials has determined that your date fields are strings. So, alphabetically, 01/03/2005 comes between 01/01/2016 and 01/31/2016.
We will either need to convert those to dates, so that the underlying data store can compare the dates properly, or reverse the order of the strings so that the most significant values are on the left (eg. YYYY-MM-DD)
I'm not sure what is happening to cause your error about the missing parameter, perhaps the parameter name is not set correctly in the search table configuration?
Regards,
-Malcolm0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare