PS Tips - Good SQL
PS Tips - Good SQL
SELECT DISTINCT
PRCS.PRCSTYPE,
PRCS.PRCSNAME,
PRCS.DESCR,
PAGE.PNLGRPNAME as Component,
'Home > ' || RTRIM(M.MENUGROUP) || ' > ' || RTRIM(M.MENULABEL) || ' > ' ||
RTRIM(ITEM.BARLABEL) || ' > ' || ITEM.ITEMLABEL as Location
FROM PSMENUDEFN M,
PSMENUITEM ITEM,
PS_PRCSDEFNPNL PAGE,
PS_PRCSDEFN PRCS
WHERE M.MENUNAME = ITEM.MENUNAME
AND ITEM.PNLGRPNAME = PAGE.PNLGRPNAME
AND PAGE.PRCSTYPE = PRCS.PRCSTYPE
AND PAGE.PRCSNAME = PRCS.PRCSNAME
AND PRCS.PRCSNAME = 'PY_PULL_COST'
5 comments:
SELECT DISTINCT
PFLD.RECNAME,
PFLD.PNLNAME as Page,
'Home > ' || RTRIM(MEN.MENUGROUP) || ' > ' || RTRIM(MEN.MENULABEL)
|| ' > ' || RTRIM(ITEM.BARLABEL) || ' > ' || ITEM.ITEMLABEL as MenuPath
FROM PSMENUDEFN MEN,
PSMENUITEM ITEM,
PSPNLGROUP COMP,
PSPNLFIELD PFLD
WHERE MEN.MENUNAME = ITEM.MENUNAME
AND ITEM.PNLGRPNAME = COMP.PNLGRPNAME
AND COMP.PNLNAME = PFLD.PNLNAME
AND PFLD.RECNAME = 'CONTRACT_DATA'
Hi jeromy,
can i post this in our tips and tricks for our team? This is very useful..
ronie
Good post. If you want to remove all the &'s from the path names, you could
substitute RTRIM(column_name) with REPLACE(RTRIM(column_name),'&','').
Ex.
BEFORE: Home > Manage Student &Records > Track &Student Careers > &Use
> Student &Program/Plan
AFTER: Home > Manage Student Records > Track Student Careers > Use >
Student Program/Plan
Occasionally, that function would remove an & that you would actually want (like
the one in 'Process Interest & Payment'). But, that would be rare.
May 7, 2008 11:37 AM
Jeromy said...
I need to replicate the following SQL in the PeoplTools Query tool so my users
can run it. I am having trouble defining it. I know I need to use an expression, but
is is not going well. Can you help. Feel free to call me at 720-913-4931. Thank
you. Bonnie