SET NOCOUNT ON SET QUOTED_IDENTIFIER ON SET ANSI_NULLS ON DECLARE @APPLET_BROWSER XML DECLARE @APPLET_SERVER XML DECLARE @BUSINESS_COMP_BROWSER XML DECLARE @BUSINESS_COMP_SERVER XML DECLARE @BUSINESS_SERVICE_BROWSER XML DECLARE @BUSINESS_SERVICE_SERVER XML DECLARE @APPLICATION_BROWSER XML DECLARE @APPLICATION_SERVER XML SET @APPLET_BROWSER = ( SELECT 'Applet Browser Script' "@name", ( SELECT NAME "@name", ( SELECT A.NAME "@Name", ( SELECT D.NAME "@name", D.LAST_UPD "@lastUpdated", D.SCRIPT "text()" FROM S_APLT_BRSSCRPT D WHERE D.APPLET_ID = A.ROW_ID AND D.REPOSITORY_ID = C.ROW_ID FOR XML PATH('Method'), Type ) FROM S_APPLET A INNER JOIN S_REPOSITORY C ON A.REPOSITORY_ID = C.ROW_ID WHERE C.NAME = R.NAME AND A.INACTIVE_FLG = 'N' AND EXISTS(SELECT * FROM S_APLT_BRSSCRPT B WHERE B.INACTIVE_FLG = 'N' AND A.ROW_ID = B.APPLET_ID) FOR XML PATH('Object'), Type ) FROM S_REPOSITORY R FOR XML PATH('Repository'), Type ) FOR XML PATH('Type') ) ------------------------------------------------------------------------------------------------------------------------------- SET @APPLET_SERVER = ( SELECT 'Applet Server Script' "@name", ( SELECT R.NAME "@name", ( SELECT A.NAME "@Name", ( SELECT D.NAME "@name", D.LAST_UPD "@lastUpdated", D.SCRIPT "text()" FROM S_APPL_WEBSCRPT D WHERE D.APPLET_ID = A.ROW_ID AND D.REPOSITORY_ID = C.ROW_ID ORDER BY SEQUENCE FOR XML PATH('Method'), Type ) FROM S_APPLET A INNER JOIN S_REPOSITORY C ON A.REPOSITORY_ID = C.ROW_ID WHERE C.NAME = R.NAME AND A.INACTIVE_FLG = 'N' AND EXISTS(SELECT * FROM S_APPL_WEBSCRPT B WHERE B.INACTIVE_FLG = 'N' AND A.ROW_ID = B.APPLET_ID) FOR XML PATH('Object'), Type ) FROM S_REPOSITORY R FOR XML PATH('Repository'), Type ) FOR XML PATH('Type') ) ------------------------------------------------------------------------------------------------------------------------------- SET @BUSINESS_COMP_SERVER = ( SELECT 'Business Component Server Script' "@name", ( SELECT NAME "@name", ( SELECT A.NAME "@Name", ( SELECT D.NAME "@name", D.LAST_UPD "@lastUpdated", D.SCRIPT "text()" FROM S_BUSCOMP_SCRIPT D WHERE D.BUSCOMP_ID = A.ROW_ID AND D.REPOSITORY_ID = C.ROW_ID ORDER BY SEQUENCE FOR XML PATH('Method'), Type ) FROM S_BUSCOMP A INNER JOIN S_REPOSITORY C ON A.REPOSITORY_ID = C.ROW_ID WHERE C.NAME = R.NAME AND A.INACTIVE_FLG = 'N' AND EXISTS(SELECT * FROM S_BUSCOMP_SCRIPT B WHERE B.INACTIVE_FLG = 'N' AND A.ROW_ID = B.BUSCOMP_ID) FOR XML PATH('Object'), Type ) FROM S_REPOSITORY R FOR XML PATH('Repository'), Type ) FOR XML PATH('Type') ) ------------------------------------------------------------------------------------------------------------------------------- SET @BUSINESS_COMP_BROWSER = ( SELECT 'Business Component Browser Script' "@name", ( SELECT R.NAME "@name", ( SELECT A.NAME "@Name", ( SELECT D.NAME "@name", D.LAST_UPD "@lastUpdated", D.SCRIPT "text()" FROM S_BC_BRS_SCRPT D WHERE D.BUSCOMP_ID = A.ROW_ID AND D.REPOSITORY_ID = C.ROW_ID FOR XML PATH('Method'), Type ) FROM S_BUSCOMP A INNER JOIN S_REPOSITORY C ON A.REPOSITORY_ID = C.ROW_ID WHERE C.NAME = R.NAME AND A.INACTIVE_FLG = 'N' AND EXISTS(SELECT * FROM S_BC_BRS_SCRPT B WHERE B.INACTIVE_FLG = 'N' AND A.ROW_ID = B.BUSCOMP_ID) FOR XML PATH('Object'), Type ) FROM S_REPOSITORY R FOR XML PATH('Repository'), Type ) FOR XML PATH('Type') ) ------------------------------------------------------------------------------------------------------------------------------- SET @BUSINESS_SERVICE_SERVER = ( SELECT 'Business Service Server Script' "@name", ( SELECT NAME "@name", ( SELECT A.NAME "@Name", ( SELECT D.NAME "@name", D.LAST_UPD "@lastUpdated", D.SCRIPT "text()" FROM S_SERVICE_SCRPT D WHERE D.SERVICE_ID = A.ROW_ID AND D.REPOSITORY_ID = C.ROW_ID ORDER BY SEQUENCE FOR XML PATH('Method'), Type ) FROM S_SERVICE A INNER JOIN S_REPOSITORY C ON A.REPOSITORY_ID = C.ROW_ID WHERE C.NAME = R.NAME AND A.INACTIVE_FLG = 'N' AND EXISTS(SELECT * FROM S_SERVICE_SCRPT B WHERE B.INACTIVE_FLG = 'N' AND A.ROW_ID = B.SERVICE_ID) FOR XML PATH('Object'), Type ) FROM S_REPOSITORY R FOR XML PATH('Repository'), Type ) FOR XML PATH('Type') ) ------------------------------------------------------------------------------------------------------------------------------- SET @BUSINESS_SERVICE_BROWSER = ( SELECT 'Business Service Browser Script' "@name", ( SELECT NAME "@name", ( SELECT A.NAME "@Name", ( SELECT D.NAME "@name", D.LAST_UPD "@lastUpdated", D.SCRIPT "text()" FROM S_SVC_BRS_SCRPT D WHERE D.SERVICE_ID = A.ROW_ID AND D.REPOSITORY_ID = C.ROW_ID FOR XML PATH('Method'), Type ) FROM S_SERVICE A INNER JOIN S_REPOSITORY C ON A.REPOSITORY_ID = C.ROW_ID WHERE C.NAME = R.NAME AND A.INACTIVE_FLG = 'N' AND EXISTS(SELECT * FROM S_SVC_BRS_SCRPT B WHERE B.INACTIVE_FLG = 'N' AND A.ROW_ID = B.SERVICE_ID) FOR XML PATH('Object'), Type ) FROM S_REPOSITORY R FOR XML PATH('Repository'), Type ) FOR XML PATH('Type') ) SET @APPLICATION_SERVER = ( SELECT 'Application Server Script' "@name", ( SELECT NAME "@name", ( SELECT A.NAME "@Name", ( SELECT D.NAME "@name", D.LAST_UPD "@lastUpdated", D.SCRIPT "text()" FROM S_APPL_SCRIPT D WHERE D.APPLICATION_ID = A.ROW_ID AND D.REPOSITORY_ID = C.ROW_ID ORDER BY SEQUENCE FOR XML PATH('Method'), Type ) FROM S_APPLICATION A INNER JOIN S_REPOSITORY C ON A.REPOSITORY_ID = C.ROW_ID WHERE C.NAME = R.NAME AND A.INACTIVE_FLG = 'N' AND EXISTS(SELECT * FROM S_APPL_SCRIPT B WHERE B.INACTIVE_FLG = 'N' AND A.ROW_ID = B.APPLICATION_ID) FOR XML PATH('Object'), Type ) FROM S_REPOSITORY R FOR XML PATH('Repository'), Type ) FOR XML PATH('Type') ) SET @APPLICATION_BROWSER = ( SELECT 'Application Browser Script' "@name", ( SELECT NAME "@name", ( SELECT A.NAME "@Name", ( SELECT D.NAME "@name", D.LAST_UPD "@lastUpdated", D.SCRIPT "text()" FROM S_APPL_BRSSCRPT D WHERE D.APPLICATION_ID = A.ROW_ID AND D.REPOSITORY_ID = C.ROW_ID FOR XML PATH('Method'), Type ) FROM S_APPLICATION A INNER JOIN S_REPOSITORY C ON A.REPOSITORY_ID = C.ROW_ID WHERE C.NAME = R.NAME AND A.INACTIVE_FLG = 'N' AND EXISTS(SELECT * FROM S_APPL_BRSSCRPT B WHERE B.INACTIVE_FLG = 'N' AND A.ROW_ID = B.APPLICATION_ID) FOR XML PATH('Object'), Type ) FROM S_REPOSITORY R FOR XML PATH('Repository'), Type ) FOR XML PATH('Type') ) /* SELECT @BUSINESS_COMP_SERVER.query('//Type') UNION ALL SELECT @BUSINESS_COMP_BROWSER.query('//Type') UNION ALL SELECT @BUSINESS_SERVICE_SERVER.query('//Type') UNION ALL SELECT @BUSINESS_SERVICE_BROWSER.query('//Type') UNION ALL SELECT @APPLICATION_SERVER.query('//Type') UNION ALL SELECT @APPLICATION_BROWSER.query('//Type') UNION ALL SELECT @APPLET_BROWSER.query('//Type') UNION ALL */ SELECT @APPLET_SERVER.query('//Type') FOR XML PATH(''), ROOT('Scripting'), TYPE
Script Dump SQL
Subscribe to:
Posts (Atom)
No comments:
Post a Comment