代码如下:
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 则认作工程类库存组织。