Search This Blog

Wednesday, March 20, 2013

SQLs useful for developers / testers


1. SQL to find the list of roles attached to a page.

select rc.rolename, rd.descr , a.classid, c.classdefndesc
from psauthitem a, psclassdefn c, psroleclass rc, psroledefn rd
where a.pnlitemname = --Enter the page Name Here
and a.baritemname= -- Enter the component name/bar_name
and a.classid = c.classid
and a.classid = rc.classid
and rc.rolename = rd.rolename
Order by rc.rolename;


2. select distinct r.recname from pspnlgroup pg,pspnlfield p,psrecdefn r where
pg.pnlgrpname ='JOB_DATA'
and pg.pnlname = p.pnlname
and p.recname = r.recname
and r.rectype = '0'
and p.recname like '%'; 

No comments: