Date problem with the two documents.

Hi friends,

I have the table and have two columns EFFECTIVE_START_DATE and EFFECTIVE_END_DATE.

Problem is I have some records of empooyee wise line and two resulting recordings gap which cannot be traceout.


E_CODE EFFECTIVE_START_DATE EFFECTIVE_END_DATE PREVIOUS_COE
10620 12 July 10 COMPANIES
10620 17 / sep / 09-30 November 09 CORPORATE
10620 19 November 07 31 January 08 CORPORATE

I want to create a view that will give me the whole same table except Effective_Start_date and Effective_End_date. Files in the sample are shown in the table below.

Fact is I don't have the current record in the table as shown in the table below, but I have to get this recods with force in the view.i must take care of EFFECTIVE_END_DATE must be-1 the next EFFECTIVE_START_DATE

E_CODE EFFECTIVE_START_DATE EFFECTIVE_END_DATE PREVIOUS_COE
10620 1 December 10 COMPANIES
10620 1 February 09 30 November 09 CORPORATE
10620 19 November 07 31 January 08 CORPORATE

Please let me know is it possible to approach this one or should I think otherwise.

Thank you
Bachan.

Bah,.

The snippet of does'nt of Lee station have hard-coded values, it was just an easy way to select by using the sample values that you provided.

I created a table with query select Lee & then creates a view for her...

CREATE table tbl_test
as SELECT e_code,
       effective_start_date,
       effective_end_date,
       previous_coe
FROM
(SELECT 10620 e_code, TO_DATE('12-Jul-2010') effective_start_date, NULL effective_end_date, 'CORPORATE' previous_coe FROM dual UNION ALL
 SELECT 10620, TO_DATE('17-Sep-2009'), TO_DATE('30-Nov-09'), 'CORPORATE' FROM dual UNION ALL
 SELECT 10620, TO_DATE('19-Nov-2007'), TO_DATE('31-Jan-08'), 'CORPORATE' FROM dual UNION ALL
 SELECT 10650, TO_DATE('14-May-2010'), NULL, 'SALES' FROM dual UNION ALL
 SELECT 10650, TO_DATE('11-Mar-2007'), TO_DATE('31-Jul-08'), 'SALES' FROM dual);

create or replace view vw_tbl_test
as
select e_code,
       NVL(LEAD(effective_end_date) OVER (ORDER BY e_code, effective_start_date DESC) + 1, effective_start_date),
       effective_end_date,
       previous_coe
from tbl_test;

Hope that is clear or can be I got you wrong.

Tags: Database

Similar Questions

  • Problem with the two EA DEVELOPER SQL DATA MODELING 3.0.0.665 and 3.1

    I created a model of very large data using SQL Developer data 3.0.0.665 and 3.1 EA maker. Its having a lot of check constraints. Whenever I am the design of the fence and the DOF and reopening export to import the DDL file failure to import completely check constraints. It is important to check constraints, but without any range of values inside. Its very frustrating because whenever you open import ddl, you must manually add again all the details of data check range constraint.

    OS: Windows XP.
    Check in the two EA Developer SQL Data Modeler 3.0.0.665 and 3.1

    -------------------------------------------
    Here are the contents of the .dmd file.
    -------------------------------------------
    * <? XML version = "1.0" encoding = "UTF - 8"? > *.
    * < OSDM_Design class = "oracle.dbtools.crest.model.design.Design" name = 'Admin_Panel' id = "9BE18B0A-6C67-2E5B-00DE-BD8312189ECB" version = "3.41" > * "
    * < createdBy > administrator < / createdBy > *.
    * < Createduserid > 2011-10-17 08:32:18 UTC < / Createduserid > *.
    * < Admin_Panel ownerDesignName > < / ownerDesignName > *.
    * < false capitalNames > < / capitalNames > *.
    * < designId > 9BE18B0A-6C67-2E5B-00DE-BD8312189ECB < / designId > *.
    * < / OSDM_Design > *.

    -------------------------------------------------------------------------------
    An example how the check constraints to get dirty.
    -------------------------------------------------------------------------------
    Initial check constraint is as below:
    ======================
    ALTER TABLE test_table
    ADD CONSTRAINT Active_Flag_ck
    CHECK (Active_Flag IN ('A', 'I'))
    *;*

    Below how it occurs once I have imported the ddl and re-export:
    ============================================
    ALTER TABLE test_table
    ADD CONSTRAINT Active_Flag_ck
    (CHECK)
    *;*

    I'm in trouble as I already in the middle of the my development using SQL Developer Data Modeler.

    Please help me soon.

    Jean

    Hi John,.

    Every time I'm fence design and export the ddl and reopening through the import of the DDL file

    Why are you doing this? Once the DDL file is imported and then save the drawing and open simply saved design, no need to generate the DDL and import it every time that you start Modeler data.
    On the list of values - forced as this CHECK (Active_Flag IN ('A', 'I')) are imported as constraint check plain and not as a list of values.
    There are the more specific elements import of check constraint - they are defined as type database constraint that you select during the import. Accordingly if you import your DOF as Oracle 10 g DDL, then you will get forced correct check in DDL generated for Oracle 10 g and Oracle 11 g. Constraint of evil will be generated for Oracle 9i. You can move the constraint for Oracle 9i (in the check constraint dialog box) or generic if it can be treated as such constraint.

    I logged for DOF bad bug.

    Philippe

  • Problem with the two factor authentication with Apple TV.

    I tried to connect to my Apple TV (2nd generation, operating system and updates are up-to-date), log-in failed and indicated that I had to use two-factor authentication which I recently install on my trust Apple devices which included my iMac, iPhone and iPad. As expected, I received a notice on my Apple devices trust with the verification code to six figures to add this code to six figures at the end of my password when signing in the Apple TV. I put my password and add the code check digit at the end on my password. It did not work. Now I can not connect. Any suggestions to connect to Apple TV using 2nd generation two-factor authentication? This Apple TV device is not supported?

    There is model of Apple TV MC572LL/A with Apple TV software version 6.2.1

    Model identifier is AppleTV2, 1

    Model number is A1378

    People have been facing difficulties with this process. I have not encountered such difficulties then have not had the opportunity to test solutions. While a little pain can I suggest that you disable temporarily two authentication step until you have set up your Apple TV.

  • Problems with the function document XSL Transformation on OSB

    I'm trying to use the xsl document feature in my XSLT file to perform a transformation on the Bus of Service Oracle (version 11.1.1.4), but I see the following error message when you run the sbconsole test (just to test the transformation currently).

    Execution of the XSLT error: com.sun.org.apache.xalan.internal.xsltc.TransletException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Validation of XSLT Project1/xslt/iso-3-to-iso-2-lookup.xml: XSLT Project1/xslt/iso-3-to-iso-2-lookup.xml does not exist has failed

    The error indicates the file XML I'm referencing from the XSLT that does not exist in the specified folder, I confirmed that the file exists and we tried to move to other places and chaning the location of reference in the XSLT, but the error persists (with location of update). Anyone know if the XSL document function is supported for the transformations on the OSB or if there is something special that needs to be done so that the OSB can refer to the XML file properly?

    Here is the code snippet of the xslt file that launches a call using the XML file:
    ...
    < xsl: output method = "xml" encoding = "UTF-8" Indent = "Yes" omit-xml-declaration = "yes" / >
    "< xsl: Key name="ISO-3-to-ISO-2-lookup ' match = 'country' use = "iso3" / >
    "< xsl: variable name="ISO-3-to-ISO-2-Lookup "select ="document('iso-3-to-iso-2-lookup.xml')/ISO-pays"/ >
    < xsl: template match = "/ xx - xxxx:SyncSearchRequest" >
    < ns0:Search >
    ...

    Here is an extract from the XML file that I use as the lookup table:
    ...
    ? XML version = "1.0"? >
    < ISO-country >
    AF < country > < iso2 > < / iso2 > < AFG iso3 > < / iso3 > < / country >
    < country > < iso2 > AX < / iso2 > < ALA iso3 > < / iso3 > < / country >
    < country > < iso2 > AL < / iso2 > < ALB iso3 > < / iso3 > < / country >
    ...

    Thanks for any help.

    In OSB, document() function needs the path absolute XML file. So if you want to access the XML document for the search, you should place the XML file on the server itself and use the path of the XML file.

    Although it is not a good approach for the management of the OSB research. The type of Document XML resource must not be used for these use cases. What you can do is create an XQuery query that can server as a DVM.
    Here is an example on how to use DVMs in OSB:
    https://blogs.Oracle.com/christomkins/entry/domain_value_maps_in_oracle_se

    If you do not want to use XQuery and want to rely only on XSLT, then in the same document XSLT to create a separate model that can store all the data of research.

  • Live data / problem with the permissions of files

    Just try an old version of Dreamweaver MX 2004. I use my service for server/test remotely webhosting server functions. It is running PHP 4.3.10 and MySQL 3.23.58. I was able to set up the database connection and test - retrieve a recordset with no problems. By following the tutorial, I found that visualized wouldn't work, he just gave me a warning about file permissions be wrong. It turns out that when Dreamweaver creates a temporary file of the work-in-progress to upload to the remote server, the file is created on the server with owner = rw, group = rw, r = world, which explains why it does not-group must be set to group = r. The file is created on the fly and then immediately deleted by Dreamweaver so it is impossible to manually set permissions on the server and probably pretty useless too.

    I tried just to save the file and the preview in the browser that forces again to be uploaded to the remote server. The first time, it resulted the browser offering a download of the file box instead to run the page. The reason is - again - that Dreamweaver updates downloaded file permissions to include the Group = rw. If I manually set permission for the group the r = group that it works very well.

    It turns out that Dreamweaver always puts the permissions of files on the downloads of files (checked php and html) on the remote server / tests to include the Group = rw. Once I have it placed manually on the remote server / tests to the Group = r for a php file, everything's fine and later additions of the same file do not change it again.

    I checked with the Web hosting company and their second line reported back that the default file permission they put on downloaded files includes group = are so DW that causes the problem of definition of group = rw first. I was confirmed using WS - FTP to download the same (renamed) file in the same directory target and the set of permissions were owner = rw, group = r, world = r.

    Then

    Can someone tell me please how to change permissions that DW sets on the files written on a remote server, because I spent countless hours on it without success. Go looking at other posts in this forum, it could be that other users hit the same kind of problem with DW8

    Specifically, Dreamweaver supports the ability to use a remote server for testing purposes. It seems reasonable to test the site locally using the real remote environment in which it must be applied if the site is not already online.

    It turns out that the problem for me is related to what the remote server and tests of server connection configured to use SFTP. This caused the files created on the remote server to have RW set for the group that has been causing all the problems. When the value to use FTP standard, is very well - prepare file permissions properly when downloading and data online works as expected.

    Another SFTP side effect was that the site FTP log contained the Interline - am added to many of them whenever the remote server has been consulted but no text. On the configuration of the connection to standard FTP log fills up with messages as expected.

  • Problems with the two Flash/Shockwave

    I have problems with both Flash and Shockwave players. I went to the help pages for both of these players and I followed all of the suggestions that they had players not playing not even if they are installed. I have ActiveX enabled in Internet properties, security software is not in any way afilliated with this problem, which leaves me with being puzzled and frustrated. I hope you guys can help out me if possible, anyway. Also, when I try to reinstall Flash and Shockwave, flash "installed successfully" two videos do not appear.

    I say well, the possibility of an accidental uninstallment of two plugins not too long could have led to this problem.

    Thank you.

    Here is the awnser to your prob... anoying * http://home.att.net/~sjesme/ of hell

  • Download data - problems with the conversion of the date

    Hello

    I have a picture that I downloaded from a database of oracle using SAS. It has a column with dates in the following format: 10/31/2012 11:00

    When I download the data (via workshop SQL-> utilities-> data workshop-> load data) by categorizing my dates as varchar2, everything works fine... but fails when I choose my type in the Date column.

    Please advice how to fix this

    Thank you

    K I import my data with other tools. Looking at the workshop of data utility, no doubt you would put MM/DD/YYYY HH: mi: SS AM in the 'Format' field for this column.

  • I'm having a problem with the FireFox browser. I have attached two files that describe the problem. I have marked their A &amp; B. A is the way it should lo

    I'm having a problem with the FireFox browser. I have attached two files that describe the problem. I have marked their A & B. A is how it should look like and B what happens once I have, I opened several tabs. I can get it back to normal if I click VIEW, click Customize. When the window customize appears that Firefox returns to its normal state. I have to click on the done button and go back to what I did. I tried to reset FireFox back to the default settings, but that has not fixed the problem.
    It started happening a month. Is there a way I can fix this? Thanks for your help. I don't know how to fix my 2 attachments that shows the problem I'm having.
    [email address removed to protect your privacy and security]

    Try disabling hardware acceleration in Firefox.

  • Problems with the date and time - have to reset the date & time on reboot

    original title: problems with the date and time

    Whenever I turn on my computer (Windows XP 2002) I click on F2.  Then I re - set the date and time it occurred in January 2006 1 h every time I have turn off the computer.  Can someone tell me what I need to do?

    You need to replace the battery in time clock (RTC) real of your computer.  It can also be called the CMOS or BIOS battery.

    Many computers, this battery is an inexpensive CR2032 button available in almost every pharmacy corner.  There are, however, some computers (especially laptops) that require a different (and probably more expensive) battery.

    Whatever the expense, almost all of these batteries are easy to replace.

    To get help, post back with the brand and model of your computer.

  • Problems with the data connection

    Hello
    I bought a Z3 Compact Xperia on December 10, 2014. I live in Italy and I use Vodafone as my everyday.
    I got a SIM card replacement nano with LtE capabilities just to get the phone in the new fast network. The problem I encounter is that, since on January 13, 2015, I had some problems with the data in mode 3 G connection.
    So far, I used my phone normally, then I tried to send a text message with WhatsApp and phone stuck with the clock icon in the lower corner of the bubble of the message. I thought it was a temporary network problem but I'm not sure about this.
    I live in a small town where the coverage is really good, either in 3G and LTE. I tend to use the 3G because it uses less battery and it does not affect my 4G data plan.
    Th issue, it's that if I do a speedtest when I feel that network glitch I have a ping, but with very good download speeds up to 2000ms.
    The problem is that I believe that this is not a network problem because my mother has a phone HtC One S and runs vodafone without problem even when I'm having the glitch.
    I tried to reset the phone to factory settings, but it did not help.
    In LTE / 4G I do not experience this issue. In fact, I think if there is problem need a phone related software because the antenna works very well.
    If it doesn't I'll try to contact ad Vodsfone then I'll send my phone for the helpdesk if Vodafone tell me that the question is not on their network.

    Thanks in advance for your help.
    Simone

    It's pretty strange, double check the APN settings and contact EE in this regard.

  • Two problems with the registry and Aero

    1. so I just follow the instructions on the Microsoft page at http://support.microsoft.com/kb/947215 on how to fix the error "the user profile service has no logon. I executer run in Safe Mode, follow the instructions in method 1, reboot and it worked again. After that things return to normal, I open the directory in the registry editor to see if anything changes. And Yes, because when I start Safe Mode and open the registry editor, I don't see that a file ends with .bak, however there are two. Is this a problem?

    2 I do not know if this has happened recently or a while back on my computer (the one with the same problem above), since I just noticed it. Usually on my other laptops, all the windows around is a 'border' like this:
    But some of the windows now appear when, will be absent this "frontier". Here are some examples:
        
      
    The above image (the stop a job), a border. But it is thin, and on the left side, there is more of a 'border' as the right and down side.

    I don't know what happened, but is there a way to solve this problem, because it does not concern normal like other computers?
    Thanks for any help.

    1. as long as you don't face any problems with the registration on your account, it is not a problem.

    2. Please run Microsoft Fixit from the following links and:
    http://support.Microsoft.com/mats/aero_effects_not_working/en-us
    http://support.Microsoft.com/mats/system_maintenance_for_windows/en-us
    http://support.Microsoft.com/mats/Windows_Display_Quality_Diagnostics/en-us
    If the problem persists, answer here.
  • My purchase is that creative cloud is a ° 16034007400 at the date of renewal, there was problems with the credit card, but the tax has been paid in January. So far I can't use the program or any of its components without Adobe me any explanation on why I

    My the purchase is Creative Cloud is a ° 16034007400 at the date of renewal there are problems with the credit card, but the deposit was paid to January. Up to now I can not use the program or one of its components without Adobe me any explanation on why I can not use.
    Why not allow Use Adobe Creative Cloud?

    : Contact support from adobe for hourly pst by clicking here and, when available, click on "still need help," http://helpx.adobe.com/x-productkb/global/service-ccm.html

  • Hi guys, I had a problem with the monthly payment, it is written that my credit card data are no longer available, but my credit card is still valid until the 04.16 I olny a few days to fix this, is there another way to make a payment?... and h

    Hi guys, I had a problem with the monthly payment, it is written that my credit card data are no longer available, but my credit card is still valid until the 04.16 I olny a few days to fix this, is there another way to make a payment?... and how I can do?

    Since this is an open forum, not Adobe support... you must contact Adobe personnel to help

    Chat/phone: Mon - Fri 05:00-19:00 (US Pacific Time)<=== note="" days="" and="">

    Don't forget to stay signed with your Adobe ID before accessing the link below

    Creative cloud support (all creative cloud customer service problems)

    http://helpx.Adobe.com/x-productkb/global/service-CCM.html

  • Since I load Acrobat Reader DC, when I try to save the document, word to PDF, the pdf file pages are cut on the width. I use Microsoft Office Word 2007 and I have no problem with the previous version of Adobe Reader. Should what settings I adjust?

    Since I load Acrobat Reader DC, when I try to save the document, word to PDF, the pdf file pages are cut on the width. I use Microsoft Office Word 2007 and I have no problem with the previous version of Adobe Reader. Should what settings I adjust?

    Hi judithl34724699,

    If you want to convert Word files to PDF with the Adobe Reader application then it is possible with the service Pack of PDF. Try to use the service on the web: https://cloud.acrobat.com/convertpdf

    Also try to use a different file type.

    Thank you

    Abhishek

  • I have problems with the form widget. When I created my forms, I need to leave out the line, one email because my client does not want the message line and two because those who have tried to fill the online form cannot submit because that box "email".

    I have problems with the form widget. When I created my forms, I need to leave out the line, one email because my client does not want the message line and two because those who have tried to fill the online form cannot submit because the 'email' box keep rejecting their email address valid. And I just tried to remove the line in my form and it does not allow me to delete or to mark it as not necessary either.

    Currently, there is no way around the field email forms of the Muse. Another option is to have a look at Jotforms or another third-party provider of shape that Muse has widgets for.

Maybe you are looking for

  • You fixed my message high cpu now I get "high memory use. What should I do?

    Should I have all the plugins that are currently on my memory? I play pogo games and sometimes large fish.

  • Firefox blocks the entire computer

    Firefox beta 11.6 is having my computer freezes constantly and I don't know how to get to an older version of beta?

  • LaserJet P3005x: P3005x prints blank Pages

    I have a LaserJet P3005x printer a blank page is added to the print job sent to it. The blank page comes first. If it's a larger work, a blank page may be added between each page. The printer is on a network with a print server Windows 2008 R2 and Wi

  • Popup remember pw

    I know that this isn't a matter of MS, but I don't know where to turn. Have of it any suggestions of where they come from? Thank you Richard

  • setStatus the right way.

    Hello I'm trying to understand how to properly use setStatus. My application works as follows. App.EnterEventDispatcher Push the new AppScreen AppScreen built the new screen to display Call httpconnection threads with m:System.NET.HttpListener.start