Calling a query such as > SELECT cast(TIMESTAMPVALUE as string), SUBSTRING(TIMESTAMPVALUE, 22, 0) FROM BQT1.SmallA fails with the following (the length of timestampvalue converted to string is 20): > com.osisoft.rdsa.RdsaException: [PIOLEDBENT] Arguments are invalid. This appears to be an issue with the SUBSTR implementation on the PI server, we are ok with either a workaround or documenting as KI.
Added to release notes errata as a known issue.
David, the doc text does not fully capture the nature of the KI. It mentions returning empty string instead of null or not supporting negative indexes, but none of that applies in this case. The real problem is that indexes larger than the length of the string result in an exception.