SQL: Below Query will fetch the field name,field type, field length and prompt table for a given record.


SQL:

SELECT REC.RECNAME,REC.FIELDNAME,CASE WHEN FLD.FIELDTYPE = 0  THEN 'Char' 
WHEN FLD.FIELDTYPE = 1  THEN 'Long Char'
WHEN FLD.FIELDTYPE = 2  THEN 'Num'
WHEN FLD.FIELDTYPE = 3  THEN 'Sign Num'
WHEN FLD.FIELDTYPE = 4  THEN 'Date'
WHEN FLD.FIELDTYPE = 5  THEN 'Time'
WHEN FLD.FIELDTYPE = 6  THEN 'Date Time'
WHEN FLD.FIELDTYPE = 8  THEN 'Image'
WHEN FLD.FIELDTYPE = 9  THEN 'Image Ref' END
,FLD.LENGTH,REC.EDITTABLE FROM PSRECFIELD REC,PSDBFIELD FLD  WHERE REC.FIELDNAME = FLD.FIELDNAME AND RECNAME = 'IIE_INT_MAP_TBL' ORDER BY FIELDNUM

Comments

Popular posts from this blog

BI Publisher: If Condition with sub-string in rtf template