(FAQ)T_FA_ASSISTACTITEM视图丢失或少字段解决方法
1人赞赏了该文章
1,294次浏览
编辑于2015年03月02日 00:00:00
【问题】: (FAQ)T_FA_ASSISTACTITEM视图丢失或少字段解决方法
版本: 7.5
模块: 固定资产
【答复】:
--执行第一步。先清除视图 If exists (select * from KSQL_USERTABLES where KSQL_TABNAME ='T_FA_ASSISTACTITEM') drop view T_FA_ASSISTACTITEM; --执行第二步。再重建视图 CREATE VIEW T_FA_ASSISTACTITEM AS SELECT a.fid FID, a.fasstacttype FASSTACTTYPE, a.fname_l1 FNAME_L1, a.fname_l2 FNAME_L2, a.fname_l3 FNAME_L3, a.fnumber FNUMBER, a.flongnumber FLONGNUMBER, a.FReationObject FREATIONOBJECT FROM ( SELECT fid FID, 'YW3xsAEJEADgAAVywKgTB0c4VZA=' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_BD_AccountBanks' FREATIONOBJECT FROM T_BD_AccountBanks UNION ALL SELECT fid FID, 'QYYAAAAAv6lHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, flongnumber FLONGNUMBER, 'T_BD_Bank' FREATIONOBJECT FROM T_BD_Bank UNION ALL SELECT fid FID, 'QYYAAAAOWJVHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, flongnumber FLONGNUMBER, 'T_BD_CashFlowItem' FREATIONOBJECT FROM T_BD_CashFlowItem UNION ALL SELECT fid FID, 'QYYAAAAAeo5HOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_BD_City' FREATIONOBJECT FROM T_BD_City UNION ALL SELECT fid FID, 'QYYAAAADYJhHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_BD_CostObject' FREATIONOBJECT FROM T_BD_CostObject UNION ALL SELECT fid FID, 'QYYAAAAN6qhHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_BD_Country' FREATIONOBJECT FROM T_BD_Country UNION ALL SELECT fid FID, 'YW3xsAEJEADgAAUWwKgTB0c4VZA=' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_BD_Customer' FREATIONOBJECT FROM T_BD_Customer UNION ALL SELECT gen.fid FID, asst.fid FASSTACTTYPE, gen.fname_l1 FNAME_L1, gen.fname_l2 FNAME_L2, gen.fname_l3 FNAME_L3, gen.fnumber FNUMBER, gen.flongnumber FLONGNUMBER, 'T_BD_GeneralAsstActType' FREATIONOBJECT FROM T_BD_GeneralAsstActType GEN INNER JOIN T_BD_GeneralAsstActTypeGroup GRO ON gro.FID = gen.fgroupid INNER JOIN T_BD_ASSTACTTYPE ASST ON asst.FGlAsstActTypeGrpID = gro.FID UNION ALL SELECT fid FID, 'QYYAAAAL1pRHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, flongnumber FLONGNUMBER, 'T_BD_Industry' FREATIONOBJECT FROM T_BD_Industry UNION ALL SELECT fid FID, 'YW3xsAEJEADgAATowKgTB0c4VZA=' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, flongnumber FLONGNUMBER, 'T_BD_Material' FREATIONOBJECT FROM T_BD_Material UNION ALL SELECT fid FID, 'YW3xsAEJEADgAAWgwKgTB0c4VZA=' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_BD_Person' FREATIONOBJECT FROM T_BD_Person UNION ALL SELECT fid FID, 'QYYAAAABsJlHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, flongnumber FLONGNUMBER, 'T_BD_Project' FREATIONOBJECT FROM T_BD_Project UNION ALL SELECT fid FID, 'QYYAAAAAepVHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_BD_Province' FREATIONOBJECT FROM T_BD_Province UNION ALL SELECT fid FID, 'YW3xsAEJEADgAAVEwKgTB0c4VZA=' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_BD_Supplier' FREATIONOBJECT FROM T_BD_Supplier UNION ALL SELECT fid FID, 'QYYAAAAA5qhHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_CAS_FeeType' FREATIONOBJECT FROM T_CAS_FeeType UNION ALL SELECT fid FID, 'QYYAAAAO6GtHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_DB_WAREHOUSE' FREATIONOBJECT FROM T_DB_WAREHOUSE UNION ALL SELECT fid FID, 'yk+67QENEADgAj+1wKg88Uc4VZA=' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_FS_InnerAccount' FREATIONOBJECT FROM T_FS_InnerAccount UNION ALL SELECT fid FID, 'QYYAAAAUdpxHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_MM_Project' FREATIONOBJECT FROM T_MM_Project UNION ALL SELECT fid FID, 'QYYAAAANNydHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_NCM_CostItem' FREATIONOBJECT FROM T_NCM_CostItem UNION ALL SELECT fid FID, 'QYYAAAAN6qdHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_NCM_Expense' FREATIONOBJECT FROM T_NCM_Expense UNION ALL SELECT fid FID, 'YW3xsAEJEADgAAYwwKgTB0c4VZA=' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, flongnumber FLONGNUMBER, 'T_ORG_Admin' FREATIONOBJECT FROM T_ORG_Admin UNION ALL SELECT fid FID, 'YW3xsAEJEADgAAYBwKgTB0c4VZA=' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, flongnumber FLONGNUMBER, 'T_ORG_Company' FREATIONOBJECT FROM T_ORG_Company UNION ALL SELECT fid FID, 'IfcAAAAAHc5HOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, flongnumber FLONGNUMBER, 'T_ORG_CostCenter' FREATIONOBJECT FROM T_ORG_CostCenter UNION ALL SELECT fid FID, 'QYYAAAAAFe5HOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_ORG_ProfitCenter' FREATIONOBJECT FROM T_ORG_ProfitCenter UNION ALL SELECT fid FID, 'QYYAAAAPBCJHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_ORG_Sale' FREATIONOBJECT FROM T_ORG_Sale UNION ALL SELECT fid FID, 'QYYAAAAN6qlHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_SU_MaterialCategory' FREATIONOBJECT FROM T_SU_MaterialCategory ) A;
版本: 7.5
模块: 固定资产
【答复】:
--执行第一步。先清除视图 If exists (select * from KSQL_USERTABLES where KSQL_TABNAME ='T_FA_ASSISTACTITEM') drop view T_FA_ASSISTACTITEM; --执行第二步。再重建视图 CREATE VIEW T_FA_ASSISTACTITEM AS SELECT a.fid FID, a.fasstacttype FASSTACTTYPE, a.fname_l1 FNAME_L1, a.fname_l2 FNAME_L2, a.fname_l3 FNAME_L3, a.fnumber FNUMBER, a.flongnumber FLONGNUMBER, a.FReationObject FREATIONOBJECT FROM ( SELECT fid FID, 'YW3xsAEJEADgAAVywKgTB0c4VZA=' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_BD_AccountBanks' FREATIONOBJECT FROM T_BD_AccountBanks UNION ALL SELECT fid FID, 'QYYAAAAAv6lHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, flongnumber FLONGNUMBER, 'T_BD_Bank' FREATIONOBJECT FROM T_BD_Bank UNION ALL SELECT fid FID, 'QYYAAAAOWJVHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, flongnumber FLONGNUMBER, 'T_BD_CashFlowItem' FREATIONOBJECT FROM T_BD_CashFlowItem UNION ALL SELECT fid FID, 'QYYAAAAAeo5HOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_BD_City' FREATIONOBJECT FROM T_BD_City UNION ALL SELECT fid FID, 'QYYAAAADYJhHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_BD_CostObject' FREATIONOBJECT FROM T_BD_CostObject UNION ALL SELECT fid FID, 'QYYAAAAN6qhHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_BD_Country' FREATIONOBJECT FROM T_BD_Country UNION ALL SELECT fid FID, 'YW3xsAEJEADgAAUWwKgTB0c4VZA=' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_BD_Customer' FREATIONOBJECT FROM T_BD_Customer UNION ALL SELECT gen.fid FID, asst.fid FASSTACTTYPE, gen.fname_l1 FNAME_L1, gen.fname_l2 FNAME_L2, gen.fname_l3 FNAME_L3, gen.fnumber FNUMBER, gen.flongnumber FLONGNUMBER, 'T_BD_GeneralAsstActType' FREATIONOBJECT FROM T_BD_GeneralAsstActType GEN INNER JOIN T_BD_GeneralAsstActTypeGroup GRO ON gro.FID = gen.fgroupid INNER JOIN T_BD_ASSTACTTYPE ASST ON asst.FGlAsstActTypeGrpID = gro.FID UNION ALL SELECT fid FID, 'QYYAAAAL1pRHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, flongnumber FLONGNUMBER, 'T_BD_Industry' FREATIONOBJECT FROM T_BD_Industry UNION ALL SELECT fid FID, 'YW3xsAEJEADgAATowKgTB0c4VZA=' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, flongnumber FLONGNUMBER, 'T_BD_Material' FREATIONOBJECT FROM T_BD_Material UNION ALL SELECT fid FID, 'YW3xsAEJEADgAAWgwKgTB0c4VZA=' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_BD_Person' FREATIONOBJECT FROM T_BD_Person UNION ALL SELECT fid FID, 'QYYAAAABsJlHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, flongnumber FLONGNUMBER, 'T_BD_Project' FREATIONOBJECT FROM T_BD_Project UNION ALL SELECT fid FID, 'QYYAAAAAepVHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_BD_Province' FREATIONOBJECT FROM T_BD_Province UNION ALL SELECT fid FID, 'YW3xsAEJEADgAAVEwKgTB0c4VZA=' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_BD_Supplier' FREATIONOBJECT FROM T_BD_Supplier UNION ALL SELECT fid FID, 'QYYAAAAA5qhHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_CAS_FeeType' FREATIONOBJECT FROM T_CAS_FeeType UNION ALL SELECT fid FID, 'QYYAAAAO6GtHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_DB_WAREHOUSE' FREATIONOBJECT FROM T_DB_WAREHOUSE UNION ALL SELECT fid FID, 'yk+67QENEADgAj+1wKg88Uc4VZA=' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_FS_InnerAccount' FREATIONOBJECT FROM T_FS_InnerAccount UNION ALL SELECT fid FID, 'QYYAAAAUdpxHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_MM_Project' FREATIONOBJECT FROM T_MM_Project UNION ALL SELECT fid FID, 'QYYAAAANNydHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_NCM_CostItem' FREATIONOBJECT FROM T_NCM_CostItem UNION ALL SELECT fid FID, 'QYYAAAAN6qdHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_NCM_Expense' FREATIONOBJECT FROM T_NCM_Expense UNION ALL SELECT fid FID, 'YW3xsAEJEADgAAYwwKgTB0c4VZA=' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, flongnumber FLONGNUMBER, 'T_ORG_Admin' FREATIONOBJECT FROM T_ORG_Admin UNION ALL SELECT fid FID, 'YW3xsAEJEADgAAYBwKgTB0c4VZA=' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, flongnumber FLONGNUMBER, 'T_ORG_Company' FREATIONOBJECT FROM T_ORG_Company UNION ALL SELECT fid FID, 'IfcAAAAAHc5HOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, flongnumber FLONGNUMBER, 'T_ORG_CostCenter' FREATIONOBJECT FROM T_ORG_CostCenter UNION ALL SELECT fid FID, 'QYYAAAAAFe5HOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_ORG_ProfitCenter' FREATIONOBJECT FROM T_ORG_ProfitCenter UNION ALL SELECT fid FID, 'QYYAAAAPBCJHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_ORG_Sale' FREATIONOBJECT FROM T_ORG_Sale UNION ALL SELECT fid FID, 'QYYAAAAN6qlHOFWQ' FASSTACTTYPE, fname_l1 FNAME_L1, fname_l2 FNAME_L2, fname_l3 FNAME_L3, fnumber FNUMBER, fnumber FLONGNUMBER, 'T_SU_MaterialCategory' FREATIONOBJECT FROM T_SU_MaterialCategory ) A;
推荐阅读