代码如下:
SELECT COUNT(1) -- INTO v_Count FROM Org_Organization_Definitions Ood, Hr_All_Organization_Units Haou WHERE 1 = 1 AND Ood.Organization_Code = ‘&Organization_Code‘ AND Ood.Organization_Id = Haou.Organization_Id AND Haou.Internal_External_Flag = ‘INT‘ AND EXISTS (SELECT 1 FROM Hr_Organization_Information WHERE Organization_Id = Haou.Organization_Id AND Org_Information_Context = ‘CLASS‘ AND Org_Information1 = ‘PA_EXPENDITURE_ORG‘ AND Org_Information2 = ‘Y‘) AND EXISTS (SELECT 1 FROM Hr_Organization_Information WHERE Organization_Id = Haou.Organization_Id AND Org_Information_Context = ‘CLASS‘ AND Org_Information1 = ‘PJM‘ AND Org_Information2 = ‘Y‘);
count <> 0 则认作工程类库存组织。
本文出自 “路漫漫其修远兮…” 博客,请务必保留此出处http://baser.blog.51cto.com/4153192/1568962
原文地址:http://baser.blog.51cto.com/4153192/1568962