CREATE OR REPLACE VIEW VIEW_RY AS
SELECT ORGUID as id,org_num as res,ORG_NAME
as name,
case when t.parent_num != '-1' then (select
o.org_num from maindb.org o where o.orguid =
t.parent_num and o.ORGSET='1') else
t.parent_num end as parent,
B001701 as orderby FROM maindb.ORG t where
org_num is not null and ORGSET='1' ORDER BY
B001701
SELECT ORGUID as id,org_num as res,ORG_NAME
as name,
case when t.parent_num != '-1' then (select
o.org_num from maindb.org o where o.orguid =
t.parent_num and o.ORGSET='1') else
t.parent_num end as parent,
B001701 as orderby FROM maindb.ORG t where
org_num is not null and ORGSET='1' ORDER BY
B001701
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货