|
"Select ( Select EMPLOYEE_NUMBER
From PER_ALL_PEOPLE_F
Where Sysdate Between PER_ALL_PEOPLE_F.EFFECTIVE_START_DATE And PER_ALL_PEOPLE_F.EFFECTIVE_END_DATE
And PER_ALL_PEOPLE_F.Person_Id = V1.Person_Id),
( Select LAST_NAME
From PER_ALL_PEOPLE_F
Where Sysdate Between PER_ALL_PEOPLE_F.EFFECTIVE_START_DATE And PER_ALL_PEOPLE_F.EFFECTIVE_END_DATE
And PER_ALL_PEOPLE_F.Person_Id = V1.Person_Id)
,V1.Last_Name,V1.Title,DECODE(V1.SEX,'F','女','M','男'),V1.MEANING,V2.MEANING,V2.CONT_INFORMATION6,V2.CONT_INFORMATION7,V2.CONT_INFORMATION8,V2.CONT_INFORMATION9
From (Select Distinct Con.Person_Id, Con.Contact_Person_Id, p.Last_Name, p.First_Name,
p.Middle_Names, p.Title, p.Pre_Name_Adjunct, p.Suffix, p.Sex, p.Date_Of_Birth,
/* Trunc(Months_Between(Fnd.Effective_Date, p.Date_Of_Birth) / 12),*/ p.Employee_Number, p.Applicant_Number,
p.National_Identifier, p.Full_Name, p.Order_Name, t.Meaning, p.Person_Type_Id
/* , PTTL.USER_PERSON_TYPE */,
/* Nvl(Hr_Person_Type_Usage_Info.Get_User_Person_Type(Fnd.Effective_Date, p.Person_Id),
Hr_Person_Type_Usage_Info.Get_User_Person_Type(p.Effective_Start_Date, p.Person_Id)),
*/ Pt.System_Person_Type, p.Current_Employee_Flag, p.Current_Applicant_Flag, p.Current_Emp_Or_Apl_Flag,
p.Registered_Disabled_Flag, p.Attribute_Category, p.Attribute1, p.Attribute2, p.Attribute3, p.Attribute4,
p.Attribute5, p.Attribute6, p.Attribute7, p.Attribute8, p.Attribute9, p.Attribute10, p.Attribute11,
p.Attribute12, p.Attribute13, p.Attribute14, p.Attribute15, p.Attribute16, p.Attribute17, p.Attribute18,
p.Attribute19, p.Attribute20, p.Attribute21, p.Attribute22, p.Attribute23, p.Attribute24, p.Attribute25,
p.Attribute26, p.Attribute27, p.Attribute28, p.Attribute29, p.Attribute30, p.Comment_Id,
p.Per_Information_Category, p.Per_Information1, p.Per_Information2, p.Per_Information3,
p.Per_Information4, p.Per_Information5, p.Per_Information6, p.Per_Information7, p.Per_Information8,
p.Per_Information9, p.Per_Information10, p.Per_Information11, p.Per_Information12, p.Per_Information13,
p.Per_Information14, p.Per_Information15, p.Per_Information16, p.Per_Information17, p.Per_Information18,
p.Per_Information19, p.Per_Information20, p.Per_Information21, p.Per_Information22, p.Per_Information23,
p.Per_Information24, p.Per_Information25, p.Per_Information26, p.Per_Information27, p.Per_Information28,
p.Per_Information29, p.Per_Information30, p.Known_As, p.Date_Of_Death, p.Created_By, p.Creation_Date,
p.Last_Updated_By, p.Last_Update_Date, p.Last_Update_Login, p.Npw_Number
From Hr_Lookups t, Per_Person_Types_Tl Pttl, Per_Person_Types Pt, Per_All_People_f p, Per_Contact_Relationships Con
Where t.Lookup_Type(+) = 'TITLE' And t.Lookup_Code(+) = p.Title And Con.Contact_Person_Id = p.Person_Id And
p.Person_Type_Id = Pt.Person_Type_Id And Pt.Person_Type_Id = Pttl.Person_Type_Id And
Pttl.Language = Userenv('LANG') ) V1,
(Select Con.Contact_Relationship_Id, Con.Business_Group_Id + 0,
Con.Contact_Person_Id, Con.Person_Id, Con.Contact_Type, c.Meaning, Con.Comments, Con.Dependent_Flag,
Con.Beneficiary_Flag, Con.Third_Party_Pay_Flag, Con.Bondholder_Flag, Con.Primary_Contact_Flag, Con.Date_Start,
Con.Start_Life_Reason_Id, Con.Date_End, Con.End_Life_Reason_Id,
Con.Rltd_Per_Rsds_w_Dsgntr_Flag, Con.Personal_Flag, Con.Sequence_Number, Con.Request_Id,
Con.Program_Application_Id, Con.Program_Id, Con.Program_Update_Date, Con.Cont_Attribute_Category,
Con.Cont_Attribute1, Con.Cont_Attribute2, Con.Cont_Attribute3, Con.Cont_Attribute4, Con.Cont_Attribute5,
Con.Cont_Attribute6, Con.Cont_Attribute7, Con.Cont_Attribute8, Con.Cont_Attribute9, Con.Cont_Attribute10,
Con.Cont_Attribute11, Con.Cont_Attribute12, Con.Cont_Attribute13, Con.Cont_Attribute14, Con.Cont_Attribute15,
Con.Cont_Attribute16, Con.Cont_Attribute17, Con.Cont_Attribute18, Con.Cont_Attribute19, Con.Cont_Attribute20,
Con.Cont_Information_Category, Con.Cont_Information1, Con.Cont_Information2, Con.Cont_Information3,
Con.Cont_Information4, Con.Cont_Information5, Con.Cont_Information6, Con.Cont_Information7, Con.Cont_Information8,
Con.Cont_Information9, Con.Cont_Information10, Con.Cont_Information11, Con.Cont_Information12,
Con.Cont_Information13, Con.Cont_Information14, Con.Cont_Information15, Con.Cont_Information16,
Con.Cont_Information17, Con.Cont_Information18, Con.Cont_Information19, Con.Cont_Information20,
Con.Last_Update_Date, Con.Last_Updated_By, Con.Last_Update_Login, Con.Created_By, Con.Creation_Date
From Hr_Lookups c, Per_Contact_Relationships Con
Where c.Lookup_Type = 'CONTACT'
And c.Lookup_Code = Con.Contact_Type ) V2
Where V1.Contact_Person_Id = V2.Contact_Person_Id" |
|