Hello
Does anyone know how to report only the most recent monitoring result from a long list of results in a text table?
Appreciate any help................
Thanks
Jaffa
Jaffa, the command Max(expression) will work for most purposes, including a simple list of dates. In that case, the Julian day number of the date that results from (expression) will be evaluated and the maximum value returned. This will be the latest date in the list.
In gINT project tables, however, you often need to evaluate the latest date that applies to a particular set of keys; PointID, Depth or other data. For that, you may need to use a SQL statement. (gINT uses Microsoft ACCESS SQL - if you have experience in writing SQL queries for Access, it is directly applicable in gINT.) You can test the selection of records with SQL by using the Tools>Queries menu option in INPUT. Once you have the query working to return the correct selection of items from INPUT, you can then translate it into a SQL() command statement in an entity or report property.
There is a set of topics in the gINT Help>Index under "SQL" that covers the use of both INPUT queries and the SQL functions.
NOTE: A fine, but important, detail of the dialect of Microsoft ACCESS SQL is that date comparisons are always assumed to be in month, day, year format, even if your system regional settings are set to day, month, year or year, month, day. If your regional settings are day-month-year, and the date entered in the WATER LEVEL.Date Measured field is for 10 July 2011 (10-6-2011), the SQL dialect used in gINT and Access would evaluate it as the Julian day number for October 6, 2011 (2455840.5) rather than the one for 10 July 2011 (2455752.5).