/*
@Author:Renxy
@Date:2012/11/09
@Discription:终极版刷新全部枚举
*/
delete from ubf_sys_extenumtype
delete from ubf_sys_extenumtype_trl
delete from ubf_sys_extenumvalue
delete from ubf_sys_extenumvalue_trl
GO
insert into ubf_sys_extenumtype select local_id as id,'20121109','Renxy','20121109','Renxy',0,fullname as code,isextend,id as uid,0 as IsRefView from ubf_md_class where classtype=3
insert into ubf_sys_extenumtype_trl select a.local_id as id,'zh-CN',b.[displayname] as [name],b.[Description] from ubf_md_class a left join ubf_RES_resourcevalue b on cast(a.[iD] as nvarchar(255)) = b.resourcename where classtype=3
insert into ubf_sys_extenumvalue select a.local_id as id,'20121109','Renxy','20121109','Renxy',0,a.[Local_Class_ID] as ExtEnumType ,a.[name] as code,a.defaultvalue as evalue,issystem,md_class_id as ExtEnumTypeUID from ubf_md_attribute as a inner join ubf_md_class as b on a.md_class_id=b.id where classtype=3
insert into ubf_sys_extenumvalue_trl select a.local_id as id,'zh-CN',c.[displayname] as [name] from ubf_md_attribute as a inner join ubf_md_class as b on a.md_class_id=b.id left join ubf_RES_resourcevalue c on cast(a.[ID] as nvarchar(255)) = c.resourcename where classtype=3
GO
@Author:Renxy
@Date:2012/11/09
@Discription:终极版刷新全部枚举
*/
delete from ubf_sys_extenumtype
delete from ubf_sys_extenumtype_trl
delete from ubf_sys_extenumvalue
delete from ubf_sys_extenumvalue_trl
GO
insert into ubf_sys_extenumtype select local_id as id,'20121109','Renxy','20121109','Renxy',0,fullname as code,isextend,id as uid,0 as IsRefView from ubf_md_class where classtype=3
insert into ubf_sys_extenumtype_trl select a.local_id as id,'zh-CN',b.[displayname] as [name],b.[Description] from ubf_md_class a left join ubf_RES_resourcevalue b on cast(a.[iD] as nvarchar(255)) = b.resourcename where classtype=3
insert into ubf_sys_extenumvalue select a.local_id as id,'20121109','Renxy','20121109','Renxy',0,a.[Local_Class_ID] as ExtEnumType ,a.[name] as code,a.defaultvalue as evalue,issystem,md_class_id as ExtEnumTypeUID from ubf_md_attribute as a inner join ubf_md_class as b on a.md_class_id=b.id where classtype=3
insert into ubf_sys_extenumvalue_trl select a.local_id as id,'zh-CN',c.[displayname] as [name] from ubf_md_attribute as a inner join ubf_md_class as b on a.md_class_id=b.id left join ubf_RES_resourcevalue c on cast(a.[ID] as nvarchar(255)) = c.resourcename where classtype=3
GO