Calculation of length of Service - splitting of the months in the years

Hi people,

I was wondering if someone might have the answer to a small length of Enigma of service employee. I'm currently building a calculation that will calculate the seniority of the employee in years entire worked only. I also need to produce a second calculation to calculate the length of the month service integers worked only, but with the whole years of a month deducted value it.

For example, if a date of hiring people is calculations on 5 February 2001 the two would return:

7 years of service
Length of the train 6 months

The following calc will generate seniority as a decimalised number:

MONTHS_BETWEEN (SYSDATE, Hire Date) / 12

As for my person example I get 7,64 years.

I need a way around this down in the nearest 1 for all years of service. I can't use the ROUND function because it rounds to the nearest, so when a number is no. 5 or above, it goes round and round only low when the number is n.49 or lower. Grrr.

My next mission is to work on the months of service based on whats after the decimal. If I could round up the length of the years of service, I think that I could achieve this goal. I just have:

ROUNDING (((MONTHS_BETWEEN (SYSDATE, Date d'embauche) / 12)-(+ ARRONDI + (MONTHS_BETWEEN (SYSDATE, Date d'embauche) / 12)) * 12))

ROUNDOWN as my nonexistent function!

Any opinion on this is greatly appreciated.

Lloyd

Use FLOOR() or tronque() instead of ROUND() to round down

Tags: Business Intelligence

Similar Questions

  • ORA-01436: CONNECT loop in the user data when the delimited string splitting by the

    I'm trying to split a string into records. The values are three characters more '-' with a limit of 12 values. The values themselves are a combination of two data, the first being two characters, a.

    The following example translates: ORA-01436: CONNECT BY a loop in the user data

    WITH
        Data(Code, Datum)
    AS
        (
         SELECT 'VGCU3VM', '00V-YYG-BVC-PIU-DV3-EVV-TVM-' FROM Dual UNION ALL
         SELECT 'VGAU3VM', '00V-YYG-BVA-PIU-DV3-EVV-TVM-' FROM Dual UNION ALL
         SELECT 'VGLN3CM', '00V-YYG-BVL-PIN-DV3-EVC-TVM-' FROM Dual UNION ALL
         SELECT 'VGLT3PM', '00V-YYG-BVL-PIT-DV3-EVP-TVM-' FROM Dual UNION ALL
         SELECT 'VGAT3RA', '00V-YYG-BVA-PIT-DV3-EVR-TVA-' FROM Dual
        )
    SELECT
        Datum,
        LEVEL,
        SUBSTR(Datum, ((LEVEL - 1) * 4) + 1, 2),
        SUBSTR(Datum, ((LEVEL - 1) * 4) + 3, 1)
    FROM
        Data
    CONNECT BY
        Code    = PRIOR Code
        AND    LEVEL    <= LENGTH(Datum) / 4;
    
    

    Remove the 'Code = Code PREREQUISITE"clause, to avoid the error, but too many records are returned, because nothing is to limit the records in their own groups.

    The following works:

    WITH
        Data(Code, Datum)
    AS
        (
         SELECT 'VGCU3VM', '00V-YYG-BVC-PIU-DV3-EVV-TVM-' FROM Dual UNION ALL
         SELECT 'VGAU3VM', '00V-YYG-BVA-PIU-DV3-EVV-TVM-' FROM Dual UNION ALL
         SELECT 'VGLN3CM', '00V-YYG-BVL-PIN-DV3-EVC-TVM-' FROM Dual UNION ALL
         SELECT 'VGLT3PM', '00V-YYG-BVL-PIT-DV3-EVP-TVM-' FROM Dual UNION ALL
         SELECT 'VGAT3RA', '00V-YYG-BVA-PIT-DV3-EVR-TVA-' FROM Dual
        )
    SELECT
        Datum,
        SUBSTR(Datum, ((Some.Num - 1) * 4) + 1, 2) A,
        SUBSTR(Datum, ((Some.Num - 1) * 4) + 3, 1) B
    FROM
        Data,
        (SELECT LEVEL Num FROM Dual CONNECT BY LEVEL <= 12) Some
    WHERE
        SUBSTR(Datum, ((Some.Num - 1) * 4) + 1, 2) IS NOT NULL;
    
    

    What causes ORA-01436?

    Hello

    Depending on your version, you can add another condition to your CONNECT BY clause.

    It works in Oracle 11.2.0.3.0:

    SELECT

    Point of reference,

    LEVEL,

    SUBSTR (Datum, ((LEVEL-1) * 4) + 1, 2),

    SUBSTR (Datum, ((LEVEL-1) * 4) + 3, 1)

    Of

    Data

    CONNECT

    Code = Code PRIOR

    AND LEVEL<= length(datum)="">

    AND PRIOR SYS_GUID () IS NOT NULL-* ADDED *.

    ;

    Thanks for the display of the data of the sample; This is really useful!

    In addition, relational databases are designed to have 1 piece of information in each column of each row, not a list delimited by up to 12 points.  It is so basic to the design of database he called the first normal form.  You're going to solve a lot of problems even before they occur if you paste to first normal form and change the table structure to resemble the result set of this query.  (Maybe that's exactly why you're doing this query.)

  • Installation of the Split of the vCAC

    Hello

    I have installed split the vCAC server where the Server Web (Model Manager Web, data, portals) are installed on a server and another server should be the server role vCAC (i.e. the Manager service) and do want to not install the web role, but everything by install Manager service, in step "The vCAC Web site Configuration", she asks for the name of the Web site and drop-down menu is not to include the existing web server site...

    Is there something that I missed, or is it configurationnelle question?

    How can I fix it or find the problem?

    Help, please!

    BR,

    MG

    The Server service manager vCAC (App) and the (web) Web farm, both require IIS.  When you use SSL, the vCAC Manager service listens on port 443. This is important since management in a generation nodes HA are not aware and require logic built into the load balancer in an active/passive configuration (this will ensure that the vCAC DB will not be damaged based on two connections to the BDD vCAC).

    When you install the web/portals/reports Manager model, the default Web site will automatically appear.  If you see no any Web site, make sure that the default Web site (or another site if configured for vCAC) runs and the WWW service is running.

  • Standard deployment failed installation foundation services deployed on the application server

    Good day ~

    Let me preface this with I have very limited exposure to Oracle products - thank you for your patience.

    I was busy learning, to install and prepare the Oracle EMP 11.1.2.3 components.

    Environment:

    New installation - I use Oracle Enterprise Performance Management System Standard Deployment Guide and the Guide of Installation and Configuration.

    Windows 2008 R2 - single server for all instances.

    SQL 2008 R2 - on a separate server.

    I started with the deployment guide Standard following all the steps for "installation of the Services of the Foundation" and at the end of the installation, it shows 'Impossible' for these red x products/task and status said Configuration is complete.

    The newspaper that I pointed at by using 'Help' EPM_ORACLE_INSTANCE/diagnostics/logs/config/configtool_summary.log says:

    (10 December 2013 12.48.49 PM): move the Foundation Hyperion [000 min 37sec] [PRE] - pre-configuration

    (10 December 2013 12.48.49 PM): pass [000 min 00 sec] [COM] Hyperion Foundation - the common settings

    (10 December 2013 12.49.48 PM): pass [000 min 58 sec] [COM] Hyperion Foundation - configure Oracle Configuration Manager

    (10 December 2013 12.49.52 PM): move the Foundation Hyperion [000 min 03sec] [DB] - database configuration

    (10 December 2013 12.50.01 PM): pass [000 min 04 sec] [PRE] Provider Services - pre-configuration

    (10 December 2013 12.55.40 PM): pass [005 min 38 sec] [PRE] Performance Management architect - pre-configuration

    (10 December 2013 12.55.41 PM): pass [000 min 00 sec] [REG] Performance Management architect - register with Shared Services

    (10 December 2013 12.55.44 PM): pass [000 min 03sec] [DB] Performance Management architect - database configuration

    (10 December 2013 12.56.15 PM): pass [000 min 30 sec] [VCC] Performance Management architect - configure the server of Dimension

    (10 December 2013 12.56.32 PM): pass [000 min 17 sec] [PRE] Essbase Studio - pre-configuration

    (10 December 2013 12.56.33 PM): pass [000 min 00 sec] [REG] Essbase Studio - register with Shared Services

    (10 December 2013 12.56.38 PM): pass [000 min 04 sec] [DB] Essbase Studio - database configuration

    (10 December 2013 12.56.38 PM): pass [000 min 00 sec] [PRE] calculation Manager - pre-configuration

    (10 December 2013 12.56.38 PM): pass [000 min 00 sec] [REG] calculation Manager - register with Shared Services

    (10 December 2013 12.56.39 PM): pass [000 min 00 sec] [DB] calculation Manager - database Configuration

    (10 December 2013 12.57.39 PM): pass [000 min 59 sec] [PRE] Reporting and analysis - pre-configuration

    (10 December 2013 12.57.40 PM): pass [000 min 00 sec] [REG] Reporting and analysis - register with Shared Services

    (10 December 2013 12.57.47 PM): pass [000 min 07 sec] [DB] Reporting and analysis - database configuration

    (10 December 2013 12.58.14 PM): pass [000 min 27 sec] [FSC] Reporting and analysis - configure the Services Framework

    (10 December 2013 12.58.15 PM): pass [000 min 00 sec] [RMI] Reporting and analysis - configure the Ports of RMI financial statement

    (10 December 2013 12.58.56 PM): failure [000 min 40 sec] [APP] Hyperion Foundation - deploy to the application server

    (10 December 2013 12.58.56 PM): failure [000 min 00 sec] [APP] Provider Services - deploy to the application server

    (10 December 2013 12.58.56 PM): failure [000 min 00 sec] [APP] performance management architect - deploy to the application server

    (10 December 2013 12.58.56 PM): failure [000 min 00 sec] [APP] performance management architect - deploy to the application server

    (10 December 2013 12.58.56 PM): failure [000 min 00 sec] [APP] calculation Manager - deploy to the application server

    (10 December 2013 12.58.56 PM): failure [000 min 00 sec] [APP] Reporting and analysis - deploy to the application server

    (10 December 2013 12.58.56 PM): failure [000 min 00 sec] [APP] Reporting and analysis - deploy to the application server

    (10 December 2013 12.58.56 PM): failure [000 min 00 sec] [APP] Workspace - deploy to the application server

    (10 December 2013 12.59.18 PM): pass [000 min 21 sec] [PRE] financial management - pre-configuration

    (10 December 2013 12.59.28 PM): move financial management [000 min 10 sec] [HDC] - DCOM configuration

    (10 December 2013 01.00.56 PM): move the Foundation Hyperion [001 min 27 sec] [WEB] - configure the Web server

    (10 December 2013 01.00.56 PM): pass [000 min 00 sec] [LWA] Hyperion Foundation - configure a logical address for Web Applications

    (10 December 2013 01.01.41 PM): iron loop [000 min 03sec] [BEW] on the task pane

    Newspapers are vague and I don't know where to go from here. Any ideas?

    Thank you in advance.

    Hello

    Please check if you are able to run Weblogic if you use as a Weblogic application server.

    Because it is the application server that establishes the communication between components.

    Thank you

    Amith

  • Calculations to return different results depending on the responsibility

    Hello

    We have a report that uses a PL/SQL function in a calculation.

    When a single responsibility runs the report, the calculation returns figures empty or incorrect.

    When another executes it, it works fine.

    When the function is created, are there grants that must be given to ensure that all responsibilities can use this?

    All the responsibilities have access to the data in the application.

    The service is owned by APPS and it was registered in the EUL.

    Also, there seems to be a difference in if this is executed from SSO launch Viewer or office.

    Kind regards

    Rachael

    Hello

    Your basic problem is that you have

    EXCEPTION
    while others then
    return sqlcode;

    at the end of your code. This means that if an error occurs when you run the function it will be completed successfully, but with some bad days.

    With this exception handling it is difficult to know what you encounter the error, but it could be a problem of access to the tables or type conversion problem.

    Rod West

  • What is the services category in the modules Manager page?

    I searched the web and the web site of firefox and I can't find anything that explains what is the category of service (found on the Manager of Addons tab):

    Get Addons
    Extensions
    Appearance
    Plugins
    Translation
    SERVICES < - cannot find anything explaining this category, and the word "services" are too general for an effective search - returns gazillions of pages...

    Hello steve_dupuis, this section is about Web services that can be integrated into the browser via the api social - for examples, see: https://activations.cdn.mozilla.net/en-US/

  • Tab HP Web services to find the claim code is not found

    Hello

    I'm trying to implement HP ePrint on my printer HP Laserjet M1522nf connected to my home network. I am unable to find the claim code for my printer set up the device connected HP services.

    I entered the IP address on my web browser and entered the Printer Setup tab, but I can't find the web services tab or the printing page of information for the claim code.

    Please let me know how to find the claim code so that I could set up ePrint.

    Thank you

    Harish

    OK done judt this device is not ready for eprint.

    Please ignore my previous post.

  • Is it possible at your service to find the person, if you know just that her Skype ID?

    Is it possible at your service to find the person, if you know just that her Skype ID? Please respond that it is very important!

    oljaklb wrote:

    But how can I report on this Skype ID? and others too? is this possible?

    Please see this: https://support.skype.com/en/faq/FA10001/How-do-I-report-abuse-by-someone-in-Skype

    About me You can also use an IP camera that your camera for Skype videoExample Instructions

  • Satellite P100-284: I noticed a split near the hinge

    Hi - I also noticed a split near the hinge on the corner of the copper colored lid of my P100-284
    Today, on careful consideration, I can see that the hairline crack appeared near the hinge on the other.
    Looks like a design fault with the supports of hinge for me.

    Hello

    I put t know if it s design fault or not, but it should be permanently replaced by the authorized Toshiba maintainer.
    Contact the tech guys in your country and explain the situation with the slot on the upper lid.

  • 513 CAPI2 event; Cryptographic services failed during the processing of the OnIdentity() call in the object of the System Writer

    * Original title: 513 CAPI2 event

    Hello.  We receive an error in the Event Viewer indicating event 513, CAPI2 that contains:

    Cryptographic services failed during the processing of the OnIdentity() call in the System Writer object.
    Details:
    TraverseDir: Impossible to push the subdirectory.

    System error:
    Unspecified error

    Here are the details:

    -
    -
     
      513
      0
      2
      0
      0
      0 x 80000000000000
     
      1039076
     
     
      Application
      KFI - SBS.kfi.local
     
     

    -
      Details: TraverseDir: impossible to push the subdirectory. System error: unspecified error
     

     

    We did most of the procedures here as well as the patch that has not worked since our server is a Windows Server 2008 SP2.  What else can be done so that we can solve the problem of System Writer.  Thank you.

    Hello

    Post your question in the TechNet Server Forums, as your question kindly is beyond the scope of these Forums.

    http://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?category=WindowsServer

    See you soon.

  • Windows 2008 Server: unable to update the password. the value provided for the new password does not respect length, complexity, or history of the field requirements

    Unable to update the password. the value provided for the new password does not respect length, complexity, or history of the field requirements

    Hello

    I suggest you to send your request in this forum for better support.
  • Failed to add the service account to the pdf generator

    Hi guys,.

    Pourrait any assistance on the question I receive.

    I am currently working on a production server and adding a service account to the pdf generator and I get the error message: "the user account is not valid for the computer.

    I can't connect to windows with this fine account.

    Is there a group policy or and rights must be changed to fix this problem?

    Please advise,

    Thank you

    Hi Venky143,

    Your question of Windows is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the Windows Server Forum. Please post your question in the Windows Server Forum.

    http://social.technet.Microsoft.com/forums/en/category/WindowsServer/

    In addition, you can post your question in the ITpro forums.

    http://social.technet.Microsoft.com/forums/en/category/w7itpro, windowsvistaitpro, windowsxpitpro, windowsintune

    Thank you.

  • I want to follow the services running on the servers of 500. I want this task to be done by my colleague on his client pc, but I don't want to share the administrator credentials. How to do this?

    I want to follow the services running on the server 500. I want this task to be done by my colleague on his client pc, but I don't want to share the administrator credentials. How to do this please think.

    Hi premkumar2k11,

    Your question of Windows is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in the TechNet Windows Server forum.

    http://social.technet.Microsoft.com/forums/en-us/winservergen/threads

  • Want to access a SOAP service and display the data in the external list

    Hello

    I could see a WCF Service via the type of external content successfully. Now I want to access a SOAP Service and display the data in an external list in Sharepoint 2010. I am able to create a data source with success with the SOAP service, but how to display the data in the external list as external list uses only as data sources for external content types.

    Also with WCF as external content type, it is only on WCF services or any kind of web services can be added as an external content type.

    Any help would be appreciated.

    Thanks in advance

    Hello sunny198218,

    The question you have posted is related to Windows Communication Foundation Service and would be better suited in the MSDN forum for category Windows Communication Foundation. I've included a link to the forum where you can ask your question.
    http://social.msdn.Microsoft.com/forums/en-us/WCF/threads

    Sincerely,

    Marilyn

  • Could not start the time service windows on the local computer 2 error

    Cannot update the system clock of time Internet.

    After double click to display the time in the taskbar, the Date and time properties window appears.

    Then I time tab-click Internet, and then click Update now - this produces the following message...
    "Year error occurred getting the status of the last synchronization." The RPC server is unavailable ".
    Then I clicked on start > Control Panel > Administrative Services > Services > time Windows
    I click Start the service and get the following message...
    "Could not start the time service windows on local computer."
    "error 2: the system cannot find the file specified."
    Help!  What now?

    Hello

    Glad to know that the problem has been resolved. If you have additional questions on the computer, please ask your question about Windows and we will be happy to help you.

Maybe you are looking for

  • Firefox does not

    I have recently upgraded to Windows 10 and now can no longer use Firefox. I tried a new install and it did not resolve it. Pages appear as broken images, or the shells of Web pages. I am also unable to access the Mozilla site properly... by clicking

  • Won't boot NB205 - black screen and white flashing underscore

    My toshiba nb205 won't start...Its shows a black screen with flashing white underscore in the top left... What should I do?The operating system is bad? Bad hard drive?Bad motherboard? Please help thanks guys.

  • Request failed to build on call Excel.Print report

    Software development in LV2009 that uses Report Generation Toolkit for reading/writing Excel models. Program works well in development mode. AppBuilder crashes when the *.exe build when adding NIReport.lvclassReport.vi rint Dig down, I find an arrow

  • E-mail notification of family re PC use child safety

    I got my first e-mail showing the use of PC for my two children. The amount of time indicated is more than seems reasonable. I was wondering, if the user account is kept open, but the laptop is put in hibernation mode this registry from time to Hiber

  • Missing files from the Installation of Windows XP disc

    Hello, I got an installation of Windows XP Professional and the installation disc, 3 files are missing, even though I don't remember the name of the files. the laptop has been pre-installed with Windows Vista Edition Home Premium and is a Compaq CQ50