Create the new table with the new calculated entries

Hello
I had a little problem.
I have a table which includes the employee vacation time. Vacation time was periodic, so I divide them into days. Now, I want to calculate the exact days. Sometimes ago weekends included I need to subtract. I have flaged everyday, I know exactly what day is a business day and that one is not. Is it possible that I have only the sum of the days without weekends?

Table Vacation_Times:

EMPL - V_Start_D - V_End_D - Date-day - D_Name
Mr.A---01.05.11---06.05.11---01.05.11---6---mercredi
M.-a---01.05.11---06.06.11---02.05.11---6---jeudi
Mr.A---01.05.11---06.05.11---03.05.11---6---vendredi
M.-a---01.05.11---06.06.11---04.05.11---6---Samedi
Mr.A---01.05.11---06.05.11---05.05.11---6---dimanche
M.-a---01.05.11---06.06.11---06.05.11---6---Lundi

NEW table:

EMPL - V_Start_D - V_End_D - Date-day - D_Name - Actual_Days
Mr.A---01.05.11---06.05.11---01.05.11---6---mercredi---4
M.-a---01.05.11---06.06.11---02.05.11---6---jeudi---4
Mr.A---01.05.11---06.05.11---03.05.11---6---vendredi---4
M.-a---01.05.11---06.06.11---04.05.11---6---Samedi---4
Mr.A---01.05.11---06.05.11---05.05.11---6---dimanche---4
M.-a---01.05.11---06.06.11---06.05.11---6---Lundi---4


THX

Hello

VR;

SELECT Empl ,V_Start_D ,V_End_D ,Date ,Days ,D_Name , count(*) as Actual_Days
FROM vacation v
JOIN datelist d ON d.day between  V_Start_D and V_End_D and d.is_working_day='Y'
GROUP BY Empl ,V_Start_D ,V_End_D ,Date ,Days ,D_Name 

Kind regards
Carsten.

Tags: Business Intelligence

Similar Questions

  • Create a new calculated columns

    Hi all

    I want to create a calculated column with the following formula:

    Sales/Sum (Sales) * 100

    I got an error saying:
    ERRORS:
    [14041] error in the measure for the test of the column definition. Nested aggregate measure definitions are not currently supported.

    I can of course create in response but the user like a column or a shared measure (which may be reusable).

    Concerning

    In fact, you must create two columns in the business model.

    First, create a column of the measure based on the level for the denominator. It must be a measure of the year-level.

    Then, create the measure part as a separate column. Select 'Sales' in your business model, right click and select "Wizard of calculation" in the context menu. You can create an action that compares the year-level measurement.

  • Creating forms on tables with policies of CAE

    Hello

    I have the security infrastructure that involves policies MEV on the tables. When the users are logged on the triggers would set the security context for their session and then EVP allows access to tables.

    Apex allows the same thing using the VPD section in the properties of application security.

    My question is how do I do the same for Apex in build mode. When I try to create the new form based on the table, I get the error in my code VPD indicating that the security session is not initialized, which of course is not like piece VPD in Apex code runs only at run time. So I tried with trigger logon to APEX_PUBLIC_USER but it seems that logon trigger does not fire during application development.

    Is there a solution to my problem?

    The other question is: is it possible to use a DB account for development and one for execution. I guess I could create two entries of Daddy in dads.conf and then use different URLS. Are there problems with it?

    Thank you
    Nenad.

    Nenad salvation,

    Adding another file dads.conf work as long as your policy of the CAE function is a check to make sure will check the current user. For example, in your policy of the CAE function, you can add the following at the beginning:

    IF use = "APEX_DEVELOPMENT_USER" then - assuming that you create this user and reference in the dads.conf
    Returns a null value.
    END IF;
    ....

    You will also need to ensure that the URL that uses the user of development is not accessible to the outside.

    Of course, you could disable VPD on your pattern of development.

    Martin

    -----
    [http://apex-smb.blogspot.com/]

  • Order creating the calculated in the PivotTable item

    Hello evereybody!

    I have a question about pivot table.

    When I created a new calculated item in the pages on PivotTable section always appear down the list. Can I have any order?

    Example: I put in the section of the page: Dim departments and I have 25 departments. I create something calculated to get the sum of all (like all the choices on command prompt), but this element appears in the last position. I would like to see in the front row. Is possible?

    Thank you!!!

    Hello

    Instead of using a new element calculated , using Total (click the sigma Pages option) > front

    Now, it shows that as first values in the drop-down list.

    Thank you & best regards
    Kishore Guggilla

  • External table with the preprocessor file to display the list of files

    Hello

    in my db 11.2.0.2 I would create an external table with script preprocessor to show me the list of files in a directory.

    Preprocessor banally:

    #! / bin/bash

    CD/MyDir

    / bin/ls-l *.txt 2 >/dev/null

    The problem is the file name that contains white space (style windows in a Linux env), for ex:

    -rw - r - r - 1 oracle oinstall 920 9 Jun 17:37 File1.txt

    -rw - r - r - 1 oracle oinstall 72316 Jun 10 10:37 file GC output1.txt

    -rw - r - r - 1 oracle oinstall 72316 Jun 10 10:40 GC file output2.txt

    So I can't use FIELDS DELIMITED BY "". ""

    FIXED size? No, because the file size change the length of the lines.

    I tried to use awk in my preprocessos script, but I have the same problem:


    / bin/ls-l *.txt 2 >/dev/null | / bin/awk ' {printf "%s %.2d %s %s\n", $6, $ 7, $ 8, $9} '.


    Any ideas?

    Hello

    I used java to retrieve information about the files.

  • JDE error: cannot find the symbol: the class Calculator

    I am trying to transfer the code that I wrote in a test over a clean workspace application and I'm missing class errors.

    I created a new workspace (abacus) and a new project (abacus) with the path com\sample\abacus and Calculator.java copied to the new folder.  In my project, I have added Calculator.java and it appears in my list of files.

    When I build I get

    D:\Program Files\Research In Motion\BlackBerry JDE 4.2.1\bin\CAbacus\com\sample\abacus\Abacus.java:22: cannot find symbol
    symbol  : class Calculator
    location: class com.monkeymade.cabacus.CAbacus
        Calculator calc = new Calculator();
        ^
    

    with the code

    class Abacus extends MainScreen{
    
        // create a new calculator
        Calculator calc = new Calculator();
    

    It's been long enough that I worked in Java and clearly, I missed a step somewhere.  Could someone straiten me?

    Seems I forgot to update the declartion of pacake in Calculator.java

    package com.sample.abacus;
    
  • Cannot create a new web page.

    I have a website and a blog set Contribute. If I navigate on the web site, index page. You then hit connect. So far, everything is ok. If I file > new or hit the new button on the tool bar I get a new black blog page. I discovered a way around, he had to use the link toolbar and click New. Then I see the dialog box with the option create new black or new model-based. Then I go back to the original page and remove the link that has been packed.

    Any ideas what I need to do to create a new page based on a free template of must create a link I don't want first?

    Steve Fredrick
    mailto:[email protected]
    Steve Fredrick photography - home
    SFredrickPhoto - Blog
    It's the light towers

    Hi Steve,.

    Can you check in preferences in Contribute in the Blog Defaults section, if the box - "Create a new blog entry, when you click on the new button" is checked? If so, you can uncheck it and check whether you are able to create new web pages.

  • external table with preprocessor option

    Hello!

    Can someone help me, I created an external table with option of preprocessor, but error encountered when querying the external table below.

    I use Version 2.1.0.63 oracle sql developer.
    I run the query on my client.
    My files are under the oracle database server (version is 11.1.0.6).
    Linux operating system.

    Error report:
    SQL error: ORA-29913: error in executing ODCIEXTTABLEOPEN legend
    ORA-29400: data cartridge error
    KUP-00554: error occurred when parsing the access settings
    KUP-01005: syntax error: found 'distinctive sign': expected an a: "badfile, bigEndian, characterset, column, data, delimited, discardfile, disable_directory_link_check, fields, set, load, logfile, language, nodiscardfile, nobadfile, nologfile, date_cache, transformation, TailleLue, chain, skip, territory, variable.
    KUP-01008: the bad ID was: PREPROCESSOR
    KUP-01007: in column 10 on line 2
    29913 00000 - "error in the execution of %s legend".
    * Cause: The execution of the specified legend caused an error.
    * Action: Examine the error messages take appropriate measures.

    Upgrades the database to 11.1.0.7 the only way to solve this problem?


    Thank you!
    Dhekz

    You need version 11.2 database...

    http://download.Oracle.com/docs/CD/E11882_01/server.112/e10881/Chapter1.htm#NEWFTCH1
    http://download.Oracle.com/docs/CD/E11882_01/server.112/e10595/tables013.htm#ADMIN12898

  • Need to create a new line in the table with the same data as the primary key, but new PK

    Hello gurus,

    I have a table with a column as a primary key, I need to create a new row in the table, but with the same data in one of the lines, but with different primary keys, focus a double row with key primary diferent...

    Any ideas of how it can be done without much complication?

    Thanks in advance for your answer.

    Agress,
    Karim idrissi

    user9970447 wrote:
    Hello gurus,

    I have a table with a column as a primary key, I need to create a new row in the table, but with the same data in one of the lines, but with different primary keys, focus a double row with key primary diferent...

    Any ideas of how it can be done without much complication?

    Thanks in advance for your answer.

    Agress,
    Karim idrissi

    something like

    insert into mytable values ('literal for new pk',
                                           select non-pk-1,
                                                    non-pk-2,
                                                    non-pk-n
                                           from mytable
                                           where pk-col = 'literal for existing pk')
    
  • How to create the new table by using the pertioned table

    Hello
    I use a partitioned table, now I want CPDR a new table with the same structure of my existing partitioned table.
    so can I use this syntax

    create the table abc_new as
    Select * from my_partitioned_table
    where 1 = 2;

    If I use this syntax, he would do the same my existing partitioned table structure?

    and

    When
    We use a syntax such as

    create the table abc_new as
    Select * from my_partitioned_table
    where 1 = 2;

    so he would also make the indexing on the new table if old table exists? If this isn't the case, then how can we create this indexing too at the time of execution of this syntax?


    regards

    N °

    Although the command would create a new table with the same column names and data types, it is NOT a partitioned table. You must explicitly specify the PARTITION BY clause and definitions of Partition when creating the table.

    Similarly, index definitions are not automatically copied. You must explicitly run the CREATE INDEX statements (which you can generate source using DBMS_METADATA. GET_DDL or by using any other tools/utilities).

    (However, if you use Export-Import - for example import to another schema, or to another database, it would create a table partitoned bearing the same name and with the same index definitions).

    Hemant K Collette

  • How to create the new domain with lookup?

    How to create the new domain with list of choices like terrain dDocType system?

    Administration/Admin Applets tab / SCCM / information fields.
    Add field or edit a custom field if you have one.
    The name field (the name will be prefaced with the lowercase letter x behind the scenes, if ever, you write the code to call it if you name this Fruit it will xFruit for code)
    Define your values for the field, but the important thing for a menu drop-down list or list of selection will be to list the Option activate the checkbox.
    Then, you perform one of the 3 main things to put data in the list.
    1. manually fill in a list of options
    2. use a DB or DB table view to view Configuration Manager
    3. create a complex tree (read the documentation on which I him have not used)

    If this does not answer your questions, click the help button in the applet.

  • steps to create the new table using existing metadata

    Hi all


    That's what I want to achieve,

    I want to create a procedure that will take an input parameter as a table name lets say 'EMP ',.
    This procedure checks if this table exists or not?
    If they don't exist
    It will create a new table with the name _dummy join the existing table name (ex: new table will be EMP_DUMMY).
    and new table should have the same structure of the table, indexes, and constraints on the EMP table.


    NB: It should not be created using select as create table EMP_DUMMY select * from EMP where = condition false;



    Can someone help me please how to achieve this?

    Please, don't post duplicate discussions.

    Check your thread previous stored procedure to create a new table with the existing table structure to further discussions

  • I have a column with two values, separated by a space, in each line. How to create 2 new columns with the first value in a column, and the second value in another column?

    I have a column with two values, separated by a space, in each line. How do I create 2 new columns with the first value in one column and the second value in another column?

    Add two new columns after than the original with space separated values column.

    Select cell B1 and type (or copy and paste it here) the formula:

    = IF (Len (a1) > 0, LEFT (A1, FIND ("", A1) −1), ' ')

    shortcut for this is:

    B1 = if (Len (a1) > 0, LEFT (A1, FIND ("", A1) −1), ' ')

    C1 = if (Len (a1) > 0, Member SUBSTITUTE (A1, B1 & "", ""), "")

    or

    the formula of the C1 could also be:

    = IF (Len (a1) > 0, RIGHT (A1, LEN (A1) −FIND ("", A1)), "")

    Select cells B1 and C1, copy

    Select cells B1 at the end of the C column, paste

  • How to create the new library of Photos to iCloud without it merging with the former?

    I started my iCPL in January 2015. It is now 104 Gb/8000 photos. In a year I need to upgrade my plan of storage iCloud.

    So I think I would make the existing one a regular photo library, and start a new photo library iCloud.

    If I start a new library now and make the iCPL, merge it with the existing iCPL. I want to replace the existing in iCloud.

    I could do (I think): -.

    1. make the existing a non-iCPL and rename it.

    2. create a new lib Photos and make the library system iCloud.

    3. the new library (empty) will download and merge with the former in iCloud, so it contains now 8000 photos of the original lib.

    4. delete all the 8000 photos in the new.

    5. start put new photos in the photo library now empty iCloud.

    Is there a better way? I do it too difficult?

    I can see what I've described above taking a long time to settle on all devices, even if I can avoid 30 day waiting by removing the deleted record recently.

    Thank you

    You use "Optimize Mac Storage" on your Mac? Then, you will need to make sure that all the photos to download to your Mac before you copy your current library corresponding to your backup disk and start deleting iCloud.  Is there enough free storage on your Mac to do this?

    I would also like to than my thin iCloud library. My iCloud library has only my favorite photos of many years, I want on all my devices as well as the most recent photos that I'm still trying. Because the iCloud library must be the library system, only in iCloud library photos are available in the media for other applications browser, so I keep all the photos here that I can use in other applications.

    What I do to save bandwidth and download time is to have two libraries:

    1. A large library where I keep all the photos I want to keep - it's my photo archives. This library is on an external drive that is supported by Time Machine and is currently still an Aperture library.
    2. A smaller library iCloud in my pictures folder.

    I import new photos first to the iCloud library, remove all the bad moves that do not need archiving, then I export the originals at the library of the archives.

    And then I start editing the photos in the library to iCloud and learn by removing and keeping only the best photos.

  • I created a custom and registered with a specific name date format. However, when I open a new worksheet, my saved format does not display in the menu drop-down? Am hoping that I don't need to create the same format for each new sheet?

    I created a custom and registered with a specific name date format. However, when I open a new worksheet, my saved format does not appear in the menu drop-down? Am hoping that I don't need to create the same format for each new sheet?

    You must save the spreadsheet containing the new date as a model format and use this custom template for each new spreadsheet where you want that this date format personalized at your disposal.

Maybe you are looking for

  • DeskJet 3835: Scanning Doc feeder does not

    Hi, I recently bought the above printer, abd despite it saying "automatic document feeder" on the box, when I try to scan a document, it scans only on self by dish/glass but usually feed the document in. It's very frustrating because I sometimes larg

  • Inline Timing and synchronization

    Hello! I created a device Inline Timing & Synchronization personalized using the custom template tool provided by NOR. After losing a day in tests, it seems that the deviceRef passed to the driver in RT is equal to 0. At first I thought that I made a

  • Jet laser pro 200 will not copy

    Hi, I had my laser jet pro 200 for at least 6 months and only used as a printer.  For the first time today, I tried to copy something and I got a white sheet of paper.  I tried the flat bed and the charger and the same result.  If all goes well, ther

  • Please bring back horizontal juxtaposition

    Please please please bring back horizontal juxtaposition for multi-screen configurations. I've upgraded to Vista and I have LESS FUNCTIONALITY! ?? This is ridiculous. Make it happen! Please, I beg you! (the section of the complaint does not work if I

  • Dead zone wheel 3000 Microsoft wireless mouse

    Hello I don't know how find this problem on the internet so I wonder if anyone can help make me the right words to look for this problem. I have Windows Vista Ultimate x 64 and a 3000 Microsoft wireless mouse When I scroll with the wheel, if I go dow