First-level menu query:
Select T.position APP,
' MODULE ' Apptype,
"AppUrl,
Mod.description,
"Maintbname,
' 5 ' Maxappsid,
T.position ORDERID,
NULL PARENT
From Maxmenu T, maxmodules MoD
where T.keyvalue = Mod.module
and T.menutype = ' MODULE '
and T.elementtype = ' MODULE '
and t.visible = 1
Second-level menu query:
Select T.position app,
' app ' Apptype,
P.app appurl,
p.description,
' Maintbname,
' 5 ' maxappsid, t.position ORDERID,
m.position parent
from Maxmenu T,
Maxapps p,
(select T.position, Mod.module
Fro M maxmenu T, maxmodules mod
where t.keyvalue = Mod.module
and t.menutype = ' module '
and t.elementtype = ' MODUL E '
and t.visible = 1
and T.moduleapp in
(select M.moduleapp
from Maxmenu m
where m.menutype = ' MODULE '
and M.elementtype = ' APP '
and M.keyvalue in
(select distinct A.app
from Applicationauth a
where A.gro Upname in
(select G.groupname
from Groupuser g)
-where G.userid = Inuserid)
and a.optionname = ' READ '
Where t.keyvalue = P.app
and t.menutype = ' MODULE '
and t.elementtype = ' app '
and T.moduleapp = M.mo Dule
and t.subposition = 0
and t.visible = 1
Like what:
Query Equipment Maintenance Plan
Select T.position App,
' APP ' Apptype,
P.app AppUrl,
P.description,
"Maintbname,
' 5 ' Maxappsid,
T.position ORDERID,
T.position Parent,
T.maxmenuid
From Maxmenu T,
Maxapps P
where T.keyvalue = P.app
and T.menutype = ' MODULE '
and T.elementtype = ' APP '
--and T.moduleapp = M.module
and t.subposition = 0
and t.visible = 1
and p.description like ' Equipment maintenance plan '
Level three menu query:
Select T.subposition App,
' APP ' Apptype,
P.app AppUrl,
P.description,
"Maintbname,
' 5 ' Maxappsid,
T.subposition ORDERID,
Pa.position Parent
From Maxmenu T,
Maxapps p,
(Select T.position, M.module
From Maxmenu T,
(Select T.position, Mod.module
From Maxmenu T, maxmodules MoD
where T.keyvalue = Mod.module
and T.menutype = ' MODULE '
and T.elementtype = ' MODULE '
and t.visible = 1
and T.moduleapp in
(Select M.moduleapp
From Maxmenu m
where M.menutype = ' MODULE '
and M.elementtype = ' APP '
and M.keyvalue in
(SELECT DISTINCT A.app
From Applicationauth A
where A.groupname in
(Select G.groupname
From Groupuser G
)
and a.optionname = ' READ ')) m
where T.menutype = ' MODULE '
and T.elementtype = ' HEADER '
and T.moduleapp = M.module
and t.visible = 1
and T.moduleapp in
(Select M.moduleapp
From Maxmenu m
where M.menutype = ' MODULE '
and M.keyvalue in
(SELECT DISTINCT A.app
From Applicationauth A
where A.groupname in
(Select G.groupname
From Groupuser G
)
and a.optionname = ' READ ')) PA
where T.keyvalue = P.app
and T.menutype = ' MODULE '
and T.elementtype = ' APP '
and T.moduleapp = Pa.module
and t.position = Pa.position
and t.visible = 1
As above, all levels of the menu information are detected, change the menu level should be reasonable to inquire
Here is the complete removal of an app to include the action:
Delete from Maxapps where app= ' SBWXJH2 ';
Delete from maxpresentation where app= ' SBWXJH2 ';
Delete from sigoption where app= ' SBWXJH2 ';
Delete from Applicationauth where app= ' SBWXJH2 ';
Delete from maxlabels where app= ' SBWXJH2 ';
Delete from Maxmenu where moduleapp= ' SBWXJH2 ' and menutype! = ' MODULE ';
Delete from Maxmenu where elementtype= ' APP ' and keyvalue= ' SBWXJH2 ';
Delete from Appdoctype where app= ' SBWXJH2 ';
Delete from Sigoptflag where app= ' SBWXJH2 ';
The above is an application that removes an application for SBWXJH2
The following is the relevant SQL for the domain query:
SELECT * from Maxattribute where objectname= ' Sbreworker ' and attributename= ' REMARK ';
SELECT * from Maxdomain where domainid= ' reworkertitle ';
SELECT * from Alndomain where domainid= ' reworkertitle ';
View sequence:
SELECT * from SYSCAT. Sequences where seqname like ' sb% ';
Set Default values:
ALTER TABLE Sbrepairplan ALTER COLUMN HASLD set with default 0
UPDATE Sbrepairplan SET hasld = DEFAULT WHERE hasld is NULL;
Alter TABLE Sbrepairplan ALTER COLUMN HASLD DROP DEFAULT;
The default value of the SQL is my online query, although the last use, but not to verify the results, with caution
Some SQL that may be used in the development of Maximo (menu query at all levels, complete deletion of the application)