Subscribe via feed.

Peoplesoft Record Information

Posted by YeaYuh on May 15, 2011 – 10:12 pm

SQL gets a PS Record information from the database in a easy to view format. Great for inserting table information documentation.

* List table meta data for conversion */
select a.recname,a.fieldname,
/* a.fieldnum, */
case b.fieldtype when 0 then ‘Char’
when 1 then ‘Long Char’
when 2 then ‘Number’
when 3 then ‘Signed Number’
when 4 then ‘Date’
when 5 then ‘Time’
when 6 then ‘DTTIM’
when 8 then ‘Image’
when 9 then ‘Image Ref’
else ‘N/A’ end type,
case
when b.fieldtype = 2 or b.fieldtype = 3 then
trim(to_char (b.length)) || ‘.’ || b.decimalpos
else to_char(b.length) end “Length”,
case b.format when 6 then ‘Mixed’
when 8 then ‘Num’
when 12 then ‘Scnds’
else ‘ ‘ end “Format” ,
case
when bitand (useedit, 1) > 0 then ‘Key’
when bitand (useedit, 2) > 0 then ‘Dup’
when bitand (useedit, 16) > 0 then ‘Alt’
else null end “Key”,
case
when bitand (useedit, 256) > 0 then ‘Yes’
else null end “Req”,
case
when bitand (useedit, 512) > 0 then ‘XLAT’
when bitand (useedit, 8192) > 0 then ‘Y/N’
when bitand (useedit , 16384) > 0 then ‘Prompt’
else null end “TblEdt”,
a.edittable “Prompt Table”,
case
when trim(a.deffieldname) = ” then ‘ ‘ else
trim (a.defrecname) || ‘.’ || a.deffieldname end “Default Value”
from psrecfielddb a, psdbfield b
where a.fieldname = b.fieldname
and recname = ‘TABLE_NAME‘ order by fieldnum;


This post is under “PeopleSoft, SLQ” and has no respond so far.
If you enjoy this article, make sure you subscribe to my RSS Feed.

Post a reply