Monday, July 12, 2010

Get Edit Tables Behind a Record Fields

A straight forward SQL to get edit tables behind field(s) for a specific record. The SQL execludes any edit tables that start with "%" as those are dynamic edit tables with values populated by PeopleCode at run time and thus will not be of a good use in this query.

SELECT R.FIELDNAME
, R.EDITTABLE
FROM PSRECFIELDDB R
, PSDBFIELD F
WHERE R.RECNAME = :RecordName
AND SUBSTR(R.EDITTABLE,1,1) <> '%'
AND R.EDITTABLE <> ' '
AND R.FIELDNAME = F.FIELDNAME
AND F.FLDNOTUSED = 0;

No comments:

Post a Comment