* SET_DB_D.TXT HARASAWA (Firebird)
*********( CREATE USER )*************************************
D+=SET{WC.PROGRAM=$WC.PROGRAM};
*(PERMISSION_BEGIN)*
=IF{_DB!='D'}JUMP{D_SKIP};
W+=SET{WC.Q='"'};
W-=SET{WC.Q=};
=MESSAGE{CREATE USER};
=WRITE_OPEN{1,?_TMP?SETUP_?_SYSTEM?.BAT,OT,/};
=SET{WC.ECHO='ECHO'};
W+=WRITE{1,'@ECHO OFF'};
=SET{WN='?$WC.ECHO? ★注意★この処理は時間がかかります、'
=   +'そのままお待ちください。'};
=WRITE{1,WN};
=SET{WC='?WC.ECHO@LOWER? LOG >?_TMP?SETUP_?_SYSTEM?.LOG'};
=WRITE{1,WC};
REPEAT0=$W0.PERMISSION
REPEAT=2 (WC.REAL_TEST##)
=SET{W0.REPEAT2CNT=0};
=SET{WC.PAS=WC.PASSWORD_?WC.REAL_TEST##?};
=SET{WC.CU='CREATEDB CREATEUSER'};
REPEAT2=4 (WC.DIOL__)
=COMPUTE{W0.REPEAT2CNT+=1};
=SET{WC.DIOL=WC.DIOL?W0.REPEAT2CNT?};
=IF{W0.REPEAT2CNT=4}SET{WC.PAS=WC.PASSWORD_LINK};
=IF{W0.REPEAT2CNT=2}SET{WC.CU=};
=SET{WC.COMMAND='-user ?WC.LOGIN_ID?'
=   +' -pass ?WC.PASSWORD_ADMIN?  -add'
=   +' ?WC.IS??WC.R_T##?_?WC.DIOL?_?WC.PER$$? -pw ?WC.PAS?'};
=SET{WC='?WC.Q??WC.PROGRAM??WC.Q?'
=+' ?WC.COMMAND? 2>>?_TMP?SETUP_?_SYSTEM?.LOG'};
=WRITE{1,WC};
REPEAT0=
=WRITE_CLOSE{1};
W-=SET{WC.CHMOD='CHMOD'};
W-=COMMAND{?WC.CHMOD@LOWER? 777 ?_TMP?SETUP_?_SYSTEM?.BAT};
=COMMAND{?_TMP?SETUP_?_SYSTEM?.BAT}NOP{};
=ERASE_FILE{SETUP_?_SYSTEM?.BAT};
*(PERMISSION_END)*
*********( CREATE DATABASE )******************************************************
=SET{WC.DB=_INSTANCE+_P+'I'+_P+'DATABASE_DAT_D'+_P+'I_'+_SYSTEM+'.FDB'};
=SET{WC.ISQL=$INSTALL_PATH+$WC.D_BIN+_P+'isql'+$WC.EXE};
=WRITE_OPEN{1,?_TMP?SETUP_?_SYSTEM?.TXT,OT,/};
=WRITE{1,'CREATE DATABASE ''?WC.DB?'' USER ''?WC.IS?R_D_ZZZZ'' PASSWORD ''?WC.PASSWORD_REAL?'';'};
=WRITE{1,'EXIT;'};
=WRITE_CLOSE{1};
=WRITE_OPEN{1,?_TMP?SETUP_?_SYSTEM?.BAT,OT,/};
=SET{WC='?WC.Q??WC.ISQL??WC.Q? -i ?_TMP?SETUP_?_SYSTEM?.TXT 2>>?_TMP?SETUP_?_SYSTEM?.LOG'};
=WRITE{1,WC};
=WRITE_CLOSE{1};
W-=COMMAND{?WC.CHMOD@LOWER? 777 ?_TMP?SETUP_?_SYSTEM?.BAT};
=COMMAND{?_TMP?SETUP_?_SYSTEM?.BAT}NOP{};
=ERASE_FILE{SETUP_?_SYSTEM?.TXT};
*********( ADD UDF  RTRIM(),e.t.c)*********************************************************
=COPY_FILE{?_TMP?SETUP_?_SYSTEM?.TXT,?$INSTALL_PATH??_P?UDF?_P?ib_udf.sql};
=WRITE_OPEN{1,?_TMP?SETUP_?_SYSTEM?.BAT,OT,/};
=SET{WC='?WC.Q??WC.ISQL??WC.Q? -i ?_TMP?SETUP_?_SYSTEM?.TXT -u ?WC.IS?R_D_ZZZZ -p ?WC.PASSWORD_REAL? ?WC.DB?  2>>?_TMP?SETUP_?_SYSTEM?.LOG'};
=WRITE{1,WC};
=WRITE_CLOSE{1};
W-=COMMAND{?WC.CHMOD@LOWER? 777 ?_TMP?SETUP_?_SYSTEM?.BAT};
=COMMAND{?_TMP?SETUP_?_SYSTEM?.BAT}NOP{};
=ERASE_FILE{SETUP_?_SYSTEM?.BAT};
=ERASE_FILE{SETUP_?_SYSTEM?.TXT};
*********( GRANT RDB$USER_PRIVERAGES )*********************************************************
=DBO_SQL{GRANT ALL    ON RDB$USER_PRIVILEGES TO I_?_SYSTEM?_R_D_ZZZZ};
=DBO_SQL{GRANT SELECT ON RDB$USER_PRIVILEGES TO PUBLIC};
********( CREATE VIEW )*************************************
*(PERMISSION_BEGIN)*
=JUMP{D_SKIP};
*****( OBJECT_VIEW )****************************************
NAME=D_OBJECT_VIEW
=SET{WC.I=WC.INSERT+'''D'','};
COPY=ADD10
=SQL{?WC?'(SYSTEM_KIND,SYSTEM_REAL,SYSTEM_WORK')};
COPY=ADD10
=SQL{?WC?',SYSTEM_USER_X,SYSTEM_NAME,SYSTEM_TEXT')};
COPY=ADD10
=SQL{?WC?',SYSTEM_ADD_DATE17,SYSTEM_CHANGE_DATE17)')};
COPY=ADD10
=SQL{?WC?' AS SELECT CAST(CASE T.RDB$RELATION_TYPE')};
COPY=ADD10
=SQL{?WC?' WHEN 0 THEN ''TABLE''')};
COPY=ADD10
=SQL{?WC?' ELSE ''VIEW'' END AS CHAR(5))')};
COPY=ADD10
=SQL{?WC?',CAST(''?_Q?_REAL_TEST?_Q?'' AS CHAR(4))')};
COPY=ADD10
=SQL{?WC?',CAST(''?WC.MAST_WORK?'' AS CHAR(4))')};
COPY=ADD10
=SQL{?WC?',CAST(SUBSTRING(T.RDB$RELATION_NAME')};
COPY=ADD10
=SQL{?WC?' FROM 2 FOR 1)AS CHAR(1))')};
COPY=ADD10
=SQL{?WC?',CAST(SUBSTRING(T.RDB$RELATION_NAME')};
COPY=ADD10
=SQL{?WC?' FROM 3 FOR')};
COPY=ADD10
=SQL{?WC?' CHAR_LENGTH(TRIM(T.RDB$RELATION_NAME))-2)')};
COPY=ADD10
=SQL{?WC?' AS CHAR(30))')};
COPY=ADD10
=SQL{?WC?',CAST(T.RDB$VIEW_SOURCE AS VARCHAR(4000))')};
COPY=ADD10
=SQL{?WC?',CAST('' '' AS CHAR(17))')};
COPY=ADD10
=SQL{?WC?',CAST('' '' AS CHAR(17))')};
COPY=ADD10
=SQL{?WC?' FROM RDB$RELATIONS T  ')};
COPY=ADD10
=SQL{?WC?' WHERE (T.RDB$RELATION_NAME LIKE')};
COPY=ADD10
=SQL{?WC?' ''?WC.D_OWNER1?%''')};
COPY=ADD10
=SQL{?WC?'  OR T.RDB$RELATION_NAME LIKE')};
COPY=ADD10
=SQL{?WC?' ''?WC.D_OWNER2?%'')')};
COPY=ADD10
=SQL{?WC?' UNION SELECT')};
COPY=ADD10
=SQL{?WC?' CAST(''PROC'' AS CHAR(5))')};
COPY=ADD10
=SQL{?WC?',CAST(''?_Q?_REAL_TEST?_Q?'' AS CHAR(4))')};
COPY=ADD10
=SQL{?WC?',CAST(''?WC.MAST_WORK?'' AS CHAR(4))')};
COPY=ADD10
=SQL{?WC?',CAST(SUBSTRING(T.RDB$PROCEDURE_NAME')};
COPY=ADD10
=SQL{?WC?' FROM 2 FOR 1) AS CHAR(1))')};
COPY=ADD10
=SQL{?WC?',CAST(SUBSTRING(T.RDB$PROCEDURE_NAME')};
COPY=ADD10
=SQL{?WC?' FROM 3 FOR')};
COPY=ADD10
=SQL{?WC?' CHAR_LENGTH(TRIM(T.RDB$PROCEDURE_NAME))-2)')};
COPY=ADD10
=SQL{?WC?' AS CHAR(30))')};
COPY=ADD10
=SQL{?WC?',CAST(T.RDB$PROCEDURE_SOURCE')};
COPY=ADD10
=SQL{?WC?' AS VARCHAR(4000))')};
COPY=ADD10
=SQL{?WC?',CAST('' '' AS CHAR(17))')};
COPY=ADD10
=SQL{?WC?',CAST('' '' AS CHAR(17))')};
COPY=ADD10
=SQL{?WC?' FROM RDB$PROCEDURES T')};
COPY=ADD10
=SQL{?WC?' WHERE (T.RDB$PROCEDURE_NAME LIKE')};
COPY=ADD10
=SQL{?WC?' ''?WC.D_OWNER1?%''')};
COPY=ADD10
=SQL{?WC?'  OR T.RDB$PROCEDURE_NAME LIKE')};
COPY=ADD10
=SQL{?WC?' ''?WC.D_OWNER2?%'')  ')};
COPY=ADD10
=SQL{?WC?' UNION SELECT')};
COPY=ADD10
=SQL{?WC?' CAST(''PROC'' AS CHAR(5))')};
COPY=ADD10
=SQL{?WC?',CAST(''?_Q?_REAL_TEST?_Q?'' AS CHAR(4))')};
COPY=ADD10
=SQL{?WC?',CAST(''?WC.MAST_WORK?'' AS CHAR(4))')};
COPY=ADD10
=SQL{?WC?',CAST(SUBSTRING(T.RDB$TRIGGER_NAME')};
COPY=ADD10
=SQL{?WC?' FROM 2 FOR 1) AS CHAR(1))')};
COPY=ADD10
=SQL{?WC?',CAST(SUBSTRING(T.RDB$TRIGGER_NAME')};
COPY=ADD10
=SQL{?WC?' FROM 3 FOR')};
COPY=ADD10
=SQL{?WC?' CHAR_LENGTH(TRIM(T.RDB$TRIGGER_NAME))-2)')};
COPY=ADD10
=SQL{?WC?' AS CHAR(30))')};
COPY=ADD10
=SQL{?WC?',CAST(T.RDB$TRIGGER_SOURCE AS VARCHAR(4000))')};
COPY=ADD10
=SQL{?WC?',CAST('' '' AS CHAR(17))')};
COPY=ADD10
=SQL{?WC?',CAST('' '' AS CHAR(17))')};
COPY=ADD10
=SQL{?WC?' FROM RDB$TRIGGERS T')};
COPY=ADD10
=SQL{?WC?' WHERE (T.RDB$TRIGGER_NAME LIKE')};
COPY=ADD10
=SQL{?WC?' ''?WC.D_OWNER1?%''')};
COPY=ADD10
=SQL{?WC?'  OR T.RDB$TRIGGER_NAME LIKE')};
COPY=ADD10
=SQL{?WC?' ''?WC.D_OWNER2?%'')')};
*****( COLUMN_VIEW )****************************************
NAME=D_COLUMN_VIEW
=SET{WC.I=WC.INSERT+'''D'','};
COPY=ADD10
=SQL{?WC?'(SYSTEM_KIND,SYSTEM_REAL,SYSTEM_WORK')};
COPY=ADD10
=SQL{?WC?',SYSTEM_USER_X,SYSTEM_NAME,SYSTEM_SEQ')};
COPY=ADD10
=SQL{?WC?',SYSTEM_DATA_NAME,SYSTEM_DEFAULT_TYPE')};
COPY=ADD10
=SQL{?WC?',SYSTEM_DEFAULT_LENGTH1')};
COPY=ADD10
=SQL{?WC?',SYSTEM_DEFAULT_LENGTH2')};
COPY=ADD10
=SQL{?WC?',SYSTEM_DEFAULT,SYSTEM_NULL)AS SELECT')};
COPY=ADD10
=SQL{?WC?' CAST(CASE T.RDB$RELATION_TYPE')};
COPY=ADD10
=SQL{?WC?' WHEN 0 THEN ''TABLE''')};
COPY=ADD10
=SQL{?WC?' ELSE ''VIEW'' END AS CHAR(5))')};
COPY=ADD10
=SQL{?WC?',CAST(''?_Q?_REAL_TEST?_Q?'' AS CHAR(4))')};
COPY=ADD10
=SQL{?WC?',CAST(''?WC.MAST_WORK?'' AS CHAR(4))')};
COPY=ADD10
=SQL{?WC?',CAST(SUBSTRING(T.RDB$RELATION_NAME')};
COPY=ADD10
=SQL{?WC?' FROM 2 FOR 1)AS CHAR(1))')};
COPY=ADD10
=SQL{?WC?',CAST(SUBSTRING(T.RDB$RELATION_NAME')};
COPY=ADD10
=SQL{?WC?' FROM 3 FOR')};
COPY=ADD10
=SQL{?WC?' CHAR_LENGTH(TRIM(T.RDB$RELATION_NAME))-2)')};
COPY=ADD10
=SQL{?WC?' AS CHAR(30)?_SQL_CHAR_SET?)')};
COPY=ADD10
=SQL{?WC?',CAST(C.RDB$FIELD_POSITION+1 AS INT)')};
COPY=ADD10
=SQL{?WC?',CAST(C.RDB$FIELD_NAME')};
COPY=ADD10
=SQL{?WC?' AS CHAR(30)?_SQL_CHAR_SET?) ')};
COPY=ADD10
=SQL{?WC?',CAST(CASE TY.RDB$TYPE_NAME ')};
COPY=ADD10
=SQL{?WC?' WHEN ''TEXT''    THEN')};
COPY=ADD10
=SQL{?WC?' CASE S.RDB$CHARACTER_SET_NAME')};
COPY=ADD10
=SQL{?WC?' WHEN ''NONE'' THEN ''CHAR''')};
COPY=ADD10
=SQL{?WC?' ELSE ''NCHAR'' END')};
COPY=ADD10
=SQL{?WC?' WHEN ''VARYING'' THEN')};
COPY=ADD10
=SQL{?WC?' CASE S.RDB$CHARACTER_SET_NAME')};
COPY=ADD10
=SQL{?WC?' WHEN ''NONE'' THEN ''VARCHAR''')};
COPY=ADD10
=SQL{?WC?' ELSE ''NVARCHAR'' END ')};
COPY=ADD10
=SQL{?WC?' WHEN ''SHORT'' THEN ''INT''')};
COPY=ADD10
=SQL{?WC?' WHEN ''TIMESTAMP'' THEN ''DATETIME''')};
COPY=ADD10
=SQL{?WC?' WHEN ''INT64'' THEN ''DECIMAL''')};
COPY=ADD10
=SQL{?WC?' WHEN ''LONG'' THEN')};
COPY=ADD10
=SQL{?WC?' CASE WHEN F.RDB$FIELD_PRECISION=0 OR ')};
COPY=ADD10
=SQL{?WC?' F.RDB$FIELD_PRECISION IS NULL THEN ''INT''')};
COPY=ADD10
=SQL{?WC?' ELSE ''DECIMAL'' END ')};
COPY=ADD10
=SQL{?WC?' ELSE  TY.RDB$TYPE_NAME END AS CHAR(9))')};
COPY=ADD10
=SQL{?WC?',CAST(CASE WHEN F.RDB$FIELD_PRECISION>0')};
COPY=ADD10
=SQL{?WC?' THEN F.RDB$FIELD_PRECISION ELSE')};
COPY=ADD10
=SQL{?WC?' CASE TY.RDB$TYPE_NAME')};
COPY=ADD10
=SQL{?WC?' WHEN ''LONG'' THEN 9')};
COPY=ADD10
=SQL{?WC?' WHEN ''SHORT'' THEN 9')};
COPY=ADD10
=SQL{?WC?' WHEN ''FLOAT'' THEN 9 ')};
COPY=ADD10
=SQL{?WC?' WHEN ''DATE''  THEN 8')};
COPY=ADD10
=SQL{?WC?' WHEN ''TIMESTAMP'' THEN 17 ')};
COPY=ADD10
=SQL{?WC?' ELSE CASE S.RDB$CHARACTER_SET_NAME ')};
COPY=ADD10
=SQL{?WC?' WHEN ''NONE'' THEN F.RDB$FIELD_LENGTH')};
COPY=ADD10
=SQL{?WC?' ELSE F.RDB$FIELD_LENGTH/?_UTF8_GET?')};
COPY=ADD10
=SQL{?WC?' END END END AS INT)')};
COPY=ADD10
=SQL{?WC?',CAST(CASE WHEN F.RDB$FIELD_PRECISION>0')};
COPY=ADD10
=SQL{?WC?' THEN 0-F.RDB$FIELD_SCALE ELSE 0 END AS INT)')};
COPY=ADD10
=SQL{?WC?',CAST(SUBSTRING(C.RDB$DEFAULT_SOURCE')};
COPY=ADD10
=SQL{?WC?' FROM 9 FOR')};
COPY=ADD10
=SQL{?WC?' CHAR_LENGTH(TRIM(C.RDB$DEFAULT_SOURCE))-8)')};
COPY=ADD10
=SQL{?WC?' AS CHAR(30)?_SQL_CHAR_SET?)')};
COPY=ADD10
=SQL{?WC?',CAST(CASE C.RDB$NULL_FLAG')};
COPY=ADD10
=SQL{?WC?' WHEN 1 THEN ''0'' ELSE ''1'' END AS CHAR(1))')};
COPY=ADD10
=SQL{?WC?' FROM RDB$RELATIONS T')};
COPY=ADD10
=SQL{?WC?' INNER JOIN RDB$RELATION_FIELDS C')};
COPY=ADD10
=SQL{?WC?' ON C.RDB$RELATION_NAME=T.RDB$RELATION_NAME')};
COPY=ADD10
=SQL{?WC?' INNER JOIN RDB$FIELDS F')};
COPY=ADD10
=SQL{?WC?' ON F.RDB$FIELD_NAME=C.RDB$FIELD_SOURCE')};
COPY=ADD10
=SQL{?WC?' INNER JOIN RDB$TYPES TY')};
COPY=ADD10
=SQL{?WC?' ON TY.RDB$TYPE=F.RDB$FIELD_TYPE')};
COPY=ADD10
=SQL{?WC?' AND TY.RDB$FIELD_NAME=''RDB$FIELD_TYPE''')};
COPY=ADD10
=SQL{?WC?' INNER JOIN RDB$CHARACTER_SETS S')};
COPY=ADD10
=SQL{?WC?' ON (S.RDB$CHARACTER_SET_ID')};
COPY=ADD10
=SQL{?WC?'=F.RDB$CHARACTER_SET_ID')};
COPY=ADD10
=SQL{?WC?' OR  S.RDB$CHARACTER_SET_ID=0')};
COPY=ADD10
=SQL{?WC?' AND F.RDB$CHARACTER_SET_ID IS NULL)')};
COPY=ADD10
=SQL{?WC?' WHERE (T.RDB$RELATION_NAME LIKE')};
COPY=ADD10
=SQL{?WC?' ''?WC.D_OWNER1?%''')};
COPY=ADD10
=SQL{?WC?'  OR T.RDB$RELATION_NAME LIKE')};
COPY=ADD10
=SQL{?WC?' ''?WC.D_OWNER2?%'')')};
*****( INDEX_VIEW )*****************************************
NAME=D_INDEX_VIEW
=SET{WC.I=WC.INSERT+'''D'','};
COPY=ADD10
=SQL{?WC?'(SYSTEM_REAL,SYSTEM_WORK,SYSTEM_USER_X')};
COPY=ADD10
=SQL{?WC?',SYSTEM_NAME,SYSTEM_DATA_NAME,SYSTEM_IX')};
COPY=ADD10
=SQL{?WC?',SYSTEM_NO)AS SELECT ')};
COPY=ADD10
=SQL{?WC?' CAST(''?_Q?_REAL_TEST?_Q?'' AS CHAR(4))')};
COPY=ADD10
=SQL{?WC?',CAST(''?WC.MAST_WORK?'' AS CHAR(4))')};
COPY=ADD10
=SQL{?WC?',CAST(SUBSTRING(T.RDB$RELATION_NAME')};
COPY=ADD10
=SQL{?WC?' FROM 2 FOR 1)AS CHAR(1))')};
COPY=ADD10
=SQL{?WC?',CAST(SUBSTRING(T.RDB$RELATION_NAME')};
COPY=ADD10
=SQL{?WC?' FROM 3 FOR')};
COPY=ADD10
=SQL{?WC?' CHAR_LENGTH(TRIM(T.RDB$RELATION_NAME))-2)')};
COPY=ADD10
=SQL{?WC?' AS CHAR(30)?_SQL_CHAR_SET?)')};
COPY=ADD10
=SQL{?WC?',CAST(C.RDB$FIELD_NAME')};
COPY=ADD10
=SQL{?WC?' AS CHAR(30)?_SQL_CHAR_SET?)')};
COPY=ADD10
=SQL{?WC?',CAST(RIGHT(TRIM(T.RDB$INDEX_NAME),1)')};
COPY=ADD10
=SQL{?WC?' AS CHAR(1))')};
COPY=ADD10
=SQL{?WC?',CAST(C.RDB$FIELD_POSITION')};
COPY=ADD10
=SQL{?WC?'+CASE RDB$UNIQUE_FLAG')};
COPY=ADD10
=SQL{?WC?' WHEN 1 THEN 0 ELSE 1 END AS INT)')};
COPY=ADD10
=SQL{?WC?' FROM RDB$INDICES T')};
COPY=ADD10
=SQL{?WC?' INNER JOIN RDB$INDEX_SEGMENTS C')};
COPY=ADD10
=SQL{?WC?' ON C.RDB$INDEX_NAME=T.RDB$INDEX_NAME')};
COPY=ADD10
=SQL{?WC?' WHERE (T.RDB$RELATION_NAME LIKE')};
COPY=ADD10
=SQL{?WC?' ''?WC.D_OWNER1?%''')};
COPY=ADD10
=SQL{?WC?' OR T.RDB$RELATION_NAME LIKE')};
COPY=ADD10
=SQL{?WC?' ''?WC.D_OWNER2?%'')')};
*****( GRANT_VIEW )*****************************************
NAME=D_GRANT_VIEW
=SET{WC.I=WC.INSERT+'''D'','};
COPY=ADD10
=SQL{?WC?'(SYSTEM_KIND,SYSTEM_REAL,SYSTEM_WORK')};
COPY=ADD10
=SQL{?WC?',SYSTEM_USER_X,SYSTEM_NAME,SYSTEM_GRANT')};
COPY=ADD10
=SQL{?WC?',SYSTEM_SELECT,SYSTEM_INSERT')};
COPY=ADD10
=SQL{?WC?',SYSTEM_UPDATE,SYSTEM_DELETE')};
COPY=ADD10
=SQL{?WC?',SYSTEM_EXECUTE)AS SELECT')};
COPY=ADD10
=SQL{?WC?' CAST(CASE T.RDB$RELATION_TYPE ')};
COPY=ADD10
=SQL{?WC?' WHEN 0 THEN ''TABLE''')};
COPY=ADD10
=SQL{?WC?' ELSE ''VIEW'' END AS CHAR(5))')};
COPY=ADD10
=SQL{?WC?',CAST(''?_Q?_REAL_TEST?_Q?'' AS CHAR(4))')};
COPY=ADD10
=SQL{?WC?',CAST(''?WC.MAST_WORK?'' AS CHAR(4))')};
COPY=ADD10
=SQL{?WC?',CAST(SUBSTRING(T.RDB$RELATION_NAME FROM')};
COPY=ADD10
=SQL{?WC?' 2 FOR 1)AS CHAR(1))')};
COPY=ADD10
=SQL{?WC?',CAST(SUBSTRING(T.RDB$RELATION_NAME')};
COPY=ADD10
=SQL{?WC?' FROM 3 FOR')};
COPY=ADD10
=SQL{?WC?' CHAR_LENGTH(TRIM(T.RDB$RELATION_NAME))-2)')};
COPY=ADD10
=SQL{?WC?' AS CHAR(30)?_SQL_CHAR_SET?)')};
COPY=ADD10
=SQL{?WC?',CAST(CASE GS.RDB$USER')};
COPY=ADD10
=SQL{?WC?' WHEN ''PUBLIC'' THEN ''PUBLIC'' ')};
COPY=ADD10
=SQL{?WC?' ELSE RIGHT(TRIM(GS.RDB$USER),6)')};
COPY=ADD10
=SQL{?WC?' END AS CHAR(6))')};
COPY=ADD10
=SQL{?WC?',CAST(CASE GS.RDB$PRIVILEGE')};
COPY=ADD10
=SQL{?WC?' WHEN ''S'' THEN ''S'' ')};
COPY=ADD10
=SQL{?WC?' ELSE '' '' END AS CHAR(1))')};
COPY=ADD10
=SQL{?WC?',CAST(CASE GI.RDB$PRIVILEGE')};
COPY=ADD10
=SQL{?WC?' WHEN ''I'' THEN ''I'' ')};
COPY=ADD10
=SQL{?WC?' ELSE '' '' END AS CHAR(1))')};
COPY=ADD10
=SQL{?WC?',CAST(CASE GU.RDB$PRIVILEGE')};
COPY=ADD10
=SQL{?WC?' WHEN ''U'' THEN ''U'' ')};
COPY=ADD10
=SQL{?WC?' ELSE '' '' END AS CHAR(1))')};
COPY=ADD10
=SQL{?WC?',CAST(CASE GD.RDB$PRIVILEGE')};
COPY=ADD10
=SQL{?WC?' WHEN ''D'' THEN ''D'' ')};
COPY=ADD10
=SQL{?WC?' ELSE '' '' END AS CHAR(1))')};
COPY=ADD10
=SQL{?WC?',CAST('' ''  AS CHAR(1))')};
COPY=ADD10
=SQL{?WC?' FROM RDB$RELATIONS T')};
COPY=ADD10
=SQL{?WC?' INNER JOIN RDB$USER_PRIVILEGES GS ')};
COPY=ADD10
=SQL{?WC?' ON GS.RDB$RELATION_NAME')};
COPY=ADD10
=SQL{?WC?'=T.RDB$RELATION_NAME')};
COPY=ADD10
=SQL{?WC?' AND GS.RDB$PRIVILEGE=''S'' ')};
COPY=ADD10
=SQL{?WC?' LEFT OUTER JOIN RDB$USER_PRIVILEGES GI ')};
COPY=ADD10
=SQL{?WC?' ON GI.RDB$RELATION_NAME')};
COPY=ADD10
=SQL{?WC?'=T.RDB$RELATION_NAME')};
COPY=ADD10
=SQL{?WC?' AND GS.RDB$PRIVILEGE=''S''')};
COPY=ADD10
=SQL{?WC?' AND GI.RDB$PRIVILEGE=''I''')};
COPY=ADD10
=SQL{?WC?' AND GI.RDB$USER=GS.RDB$USER')};
COPY=ADD10
=SQL{?WC?' LEFT OUTER JOIN RDB$USER_PRIVILEGES GU ')};
COPY=ADD10
=SQL{?WC?' ON GU.RDB$RELATION_NAME')};
COPY=ADD10
=SQL{?WC?'=T.RDB$RELATION_NAME')};
COPY=ADD10
=SQL{?WC?' AND GS.RDB$PRIVILEGE=''S''')};
COPY=ADD10
=SQL{?WC?' AND GU.RDB$PRIVILEGE=''U''')};
COPY=ADD10
=SQL{?WC?' AND GU.RDB$USER=GS.RDB$USER')};
COPY=ADD10
=SQL{?WC?' LEFT OUTER JOIN RDB$USER_PRIVILEGES GD ')};
COPY=ADD10
=SQL{?WC?' ON GD.RDB$RELATION_NAME')};
COPY=ADD10
=SQL{?WC?'=T.RDB$RELATION_NAME')};
COPY=ADD10
=SQL{?WC?' AND GS.RDB$PRIVILEGE=''S''')};
COPY=ADD10
=SQL{?WC?' AND GD.RDB$PRIVILEGE=''D''')};
COPY=ADD10
=SQL{?WC?' AND GD.RDB$USER=GS.RDB$USER')};
COPY=ADD10
=SQL{?WC?' WHERE (T.RDB$RELATION_NAME LIKE')};
COPY=ADD10
=SQL{?WC?' ''?WC.D_OWNER1?%''')};
COPY=ADD10
=SQL{?WC?'  OR T.RDB$RELATION_NAME LIKE')};
COPY=ADD10
=SQL{?WC?' ''?WC.D_OWNER2?%'') ')};
COPY=ADD10
=SQL{?WC?' AND (GS.RDB$USER=''PUBLIC'' OR')};
COPY=ADD10
=SQL{?WC?' SUBSTRING(GS.RDB$USER  FROM ')};
COPY=ADD10
=SQL{?WC?' CHAR_LENGTH(TRIM(GS.RDB$USER))-7 FOR 1)')};
COPY=ADD10
=SQL{?WC?'=SUBSTRING(T.RDB$RELATION_NAME')};
COPY=ADD10
=SQL{?WC?' FROM 1 FOR 1))')};
NAME=
****************************************************
=D_SKIP:
*(PERMISSION_END)*
