楼主: vvyjp

ORACLE HRMS 查询数据SQL

[复制链接]
论坛徽章:
135
奥运会纪念徽章:乒乓球
日期:2012-08-23 19:41:492014数据库大会纪念章
日期:2015-04-23 10:33:192013数据库大会纪念章
日期:2015-04-23 10:33:192012数据库大会纪念章
日期:2015-04-23 10:33:192011数据库大会纪念章
日期:2015-04-23 10:33:192010数据库技术大会纪念徽章
日期:2015-04-23 10:33:19马上加薪
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14
11#
 楼主| 发表于 2007-5-27 08:46 | 只看该作者
select * from PER_SPECIAL_INFO_TYPES_V
select * from per_person_analyses T2 where T2.Id_Flex_Num=

使用道具 举报

回复
论坛徽章:
135
奥运会纪念徽章:乒乓球
日期:2012-08-23 19:41:492014数据库大会纪念章
日期:2015-04-23 10:33:192013数据库大会纪念章
日期:2015-04-23 10:33:192012数据库大会纪念章
日期:2015-04-23 10:33:192011数据库大会纪念章
日期:2015-04-23 10:33:192010数据库技术大会纪念徽章
日期:2015-04-23 10:33:19马上加薪
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14
12#
 楼主| 发表于 2007-5-27 08:47 | 只看该作者
select * from PER_ANALYSIS_CRITERIA T3 where t3.id_flex_num=

使用道具 举报

回复
论坛徽章:
135
奥运会纪念徽章:乒乓球
日期:2012-08-23 19:41:492014数据库大会纪念章
日期:2015-04-23 10:33:192013数据库大会纪念章
日期:2015-04-23 10:33:192012数据库大会纪念章
日期:2015-04-23 10:33:192011数据库大会纪念章
日期:2015-04-23 10:33:192010数据库技术大会纪念徽章
日期:2015-04-23 10:33:19马上加薪
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14
13#
 楼主| 发表于 2007-5-27 08:53 | 只看该作者
select T1.Last_Name,
       T2.Date_From,
       T2.Date_To,
       T3.Segment1,
       t3.segment2,
       t3.segment3,
       t3.segment4,
       t3.segment5
  from per_all_people_f      T1,
       per_person_analyses   t2,
       PER_ANALYSIS_CRITERIA t3
where sysdate between T1.Effective_Start_Date and T1.Effective_End_Date
and T2.Id_Flex_Num=
and T1.Person_Id=T2.Person_Id
and T2.ANALYSIS_CRITERIA_ID=T3.Analysis_Criteria_Id
and T2.Id_Flex_Num=t3.id_flex_num

使用道具 举报

回复
论坛徽章:
135
奥运会纪念徽章:乒乓球
日期:2012-08-23 19:41:492014数据库大会纪念章
日期:2015-04-23 10:33:192013数据库大会纪念章
日期:2015-04-23 10:33:192012数据库大会纪念章
日期:2015-04-23 10:33:192011数据库大会纪念章
日期:2015-04-23 10:33:192010数据库技术大会纪念徽章
日期:2015-04-23 10:33:19马上加薪
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14
14#
 楼主| 发表于 2007-5-27 08:55 | 只看该作者
SELECT /*ROWID,*/
       p.PHONE_TYPE,
       p.PHONE_NUMBER,
       p.DATE_FROM,
       p.DATE_TO,
       p.PARENT_ID,
       p.PARENT_TABLE,
       p.ATTRIBUTE_CATEGORY,
       p.CREATED_BY,
       p.CREATION_DATE,
       p.LAST_UPDATED_BY,
       p.LAST_UPDATE_DATE,
       p.LAST_UPDATE_LOGIN,
       p.OBJECT_VERSION_NUMBER,
       p.PARTY_ID
  FROM PER_PHONES p,per_all_people_f per
WHERE p.parent_table = 'PER_ALL_PEOPLE_F' and PARENT_ID=per.person_id
and sysdate between per.effective_start_date and per.effective_end_date
/*   and parent_id = '12345'*/
order by nvl(p.date_to, to_date('4900/12/31', 'YYYY/MM/DD')) desc,
          p.phone_type

使用道具 举报

回复
论坛徽章:
135
奥运会纪念徽章:乒乓球
日期:2012-08-23 19:41:492014数据库大会纪念章
日期:2015-04-23 10:33:192013数据库大会纪念章
日期:2015-04-23 10:33:192012数据库大会纪念章
日期:2015-04-23 10:33:192011数据库大会纪念章
日期:2015-04-23 10:33:192010数据库技术大会纪念徽章
日期:2015-04-23 10:33:19马上加薪
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14
15#
 楼主| 发表于 2007-5-27 08:57 | 只看该作者
select * from per_periods_of_service_v t Where   t.final_process_date Is Not  Null
final_process_date<sysdate离职

使用道具 举报

回复
论坛徽章:
135
奥运会纪念徽章:乒乓球
日期:2012-08-23 19:41:492014数据库大会纪念章
日期:2015-04-23 10:33:192013数据库大会纪念章
日期:2015-04-23 10:33:192012数据库大会纪念章
日期:2015-04-23 10:33:192011数据库大会纪念章
日期:2015-04-23 10:33:192010数据库技术大会纪念徽章
日期:2015-04-23 10:33:19马上加薪
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14
16#
 楼主| 发表于 2007-5-27 09:20 | 只看该作者
"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"

使用道具 举报

回复
论坛徽章:
135
奥运会纪念徽章:乒乓球
日期:2012-08-23 19:41:492014数据库大会纪念章
日期:2015-04-23 10:33:192013数据库大会纪念章
日期:2015-04-23 10:33:192012数据库大会纪念章
日期:2015-04-23 10:33:192011数据库大会纪念章
日期:2015-04-23 10:33:192010数据库技术大会纪念徽章
日期:2015-04-23 10:33:19马上加薪
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14
17#
 楼主| 发表于 2007-5-27 09:22 | 只看该作者
elect
    decode( OBJECT_TYPE, 'PACKAGE BODY',
    'alter package ' || OWNER||'.'||OBJECT_NAME || ' compile body;',
    'alter ' || OBJECT_TYPE || ' ' || OWNER||'.'||OBJECT_NAME || ' compile;' )
from
   dba_objects
where
   STATUS = 'INVALID' and OBJECT_TYPE in
   ( 'PACKAGE BODY', 'PACKAGE', 'FUNCTION', 'PROCEDURE', 'TRIGGER', 'VIEW' )
order by OWNER, OBJECT_TYPE, OBJECT_NAME;

使用道具 举报

回复
论坛徽章:
135
奥运会纪念徽章:乒乓球
日期:2012-08-23 19:41:492014数据库大会纪念章
日期:2015-04-23 10:33:192013数据库大会纪念章
日期:2015-04-23 10:33:192012数据库大会纪念章
日期:2015-04-23 10:33:192011数据库大会纪念章
日期:2015-04-23 10:33:192010数据库技术大会纪念徽章
日期:2015-04-23 10:33:19马上加薪
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14
18#
 楼主| 发表于 2007-5-27 11:05 | 只看该作者
/*-------------------------------------------------------------
  FORMULA NAME: BEM_ABSENCE_FOR_PRE_MATERNITY_LEAVE
  FORMULA TYPE: Oracle Payroll
  DESCRIPTION : 短期产前假的计算:发放额 =应付工资*80%
--------------------------------------------------------------*/

/* DEFAULT SECTION */
DEFAULT FOR PAY_PROC_PERIOD_END_DATE IS  '0001/01/01 00:00:00' (DATE)
DEFAULT FOR 休假小时 IS 0
DEFAULT FOR 应付工资_ASG_RUN IS 0

/* INPUT SECTION */
INPUTS ARE
  休假小时

l_memo = ' '  
l_workingday_count = 0
l_absence_reason = ' '
l_absence_hours = 休假小时
l_pay_proc_period_end_date = PAY_PROC_PERIOD_END_DATE
l_base_amount = 应付工资_ASG_RUN

l_result = BEM_GET_ABSENCE_INFORMATION(l_workingday_count, l_absence_reason, l_memo)

IF l_result <> 'SUCCESS' THEN
  (
  l_err_message = 'BEM_GET_ABSENCE_INFORMATION 运行出错,返回结果:' || l_result
  RETURN l_err_message
  )

l_grant_rate = 0.8
  
IF l_workingday_count <> 0 THEN
  l_calculation_amount = l_base_amount * l_absence_hours / 8 / l_workingday_count * (1 - l_grant_rate)
ELSE
  l_calculation_amount = 0

RETURN l_calculation_amount, l_absence_hours, l_workingday_count, l_absence_reason, l_memo

使用道具 举报

回复
论坛徽章:
35
ITPUB9周年纪念徽章
日期:2010-10-08 09:32:25劳斯莱斯
日期:2013-11-04 15:42:11奥迪
日期:2013-11-04 15:42:11福特
日期:2013-11-04 15:42:11比亚迪
日期:2013-11-02 11:33:55法拉利
日期:2013-11-10 17:40:262014年新春福章
日期:2014-02-18 16:41:11马上有车
日期:2014-02-18 16:41:11马上有对象
日期:2014-03-06 14:09:44马上有房
日期:2014-05-06 18:40:39
19#
发表于 2007-5-27 21:48 | 只看该作者
thanks for your share , teacher Yu.

使用道具 举报

回复
论坛徽章:
66
ITPUB元老
日期:2005-02-28 12:57:002012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20版主2段
日期:2012-05-15 15:24:11ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322013年新春福章
日期:2013-02-25 14:51:24优秀写手
日期:2013-12-18 09:29:09
20#
发表于 2007-5-31 14:30 | 只看该作者
老俞加文件头或者注释啊~以后想找很难找的

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表