SQLCode=-138 flagging on large count tables but not small DB2
问题 I built a view in which I'm using the following code to pull only the Last name from a field that is formatted 'LastName,FirstName': VALUE(RTRIM(SUBSTR(A.PREVIOUS_NAMES,1,LOCATE(',', A.PREVIOUS_NAMES)-1)), '') AS "PREVIOUS_NAME", This view worked fine as I was working in our sandbox environment, but as I moved it up to test, and try to open the view in DBVisualizer, the data results provide the Error: THE SECOND OR THIRD ARGUMENT OF THE SUBSTR OR SUBSTRING FUNCTION IS OUT OF RANGE. SQLCODE=