SQL - prior

Hello

Database: Oracle11g SE a

I have two tables. First of all is (example) Table1:

UID CURRENTSTATE

111 state3

And on the other hand, Table2:

STATE of the UID Table1_UID Date (jj/mm/aaaa)

12 State1 111 01/01/2015

13 State2 111 01/02/2015

14 state3 111 01/03/2015

I want to find the first previous state of Table1_UID = 111. In the example above his State2.

And if this second table has only a single State, it should return only in that State.

It would be great if this select returns: Table1_UID Currentstate Previousstate

Thank you for your help.

Assuming statehistory contains state data as the last entry


with

State as

(select 1 oid, "State1" union currentstate double all the)

Select 2, 'State2' from dual union all

Select 3, 'State3' from dual

),

StateHistory as

(select oid 111, stateoid '1', 'State1"statetype, to_date('01.01.2015','dd.mm.yyyy') statedate of double union all)

Select 112, '2', 'State1', to_date('10.01.2015','dd.mm.yyyy') in all the double union

Select 113, '2', 'State2', to_date('12.01.2015','dd.mm.yyyy') in all the double union

Select 114, '3', 'State1', to_date('01.02.2015','dd.mm.yyyy') in all the double union

Select 115, '3', 'State2', to_date('07.02.2015','dd.mm.yyyy') in all the double union

Select 116, '3', 'State3', double to_date('12.02.2015','dd.mm.yyyy')

)

Select s.oid, s.currentstate, nvl (h.statetype, s.currentstate) priorstate

s State

left outer join

(select to_number (stateoid) stateoid,

stateType,

ROW_NUMBER() over (partition by stateoid by statedate desc order) rn

of statehistory

) h

On s.oid = h.stateoid

and h.rn = 2

order of s.oid

OID CURRENTSTATE PRIORSTATE
1 State1 State1
2 State2 State1
3 State3 State2

Concerning

Etbin

Tags: Database

Similar Questions

  • Select the line of the classic report to pass the value to another classic report on the same page

    Hello

    First a few details about the environment - I use the image of the last download oracle VM developer days to oracle.com. This includes DB version 12.1.0.2 and version 4.2.5.00.08 Apex. For the question although I don't know the specifics of the versions that are relevant.

    What I want to do an apex page which includes an analytical section at the top, followed by a section of retail slot - a line is selected / highlighted at the top which causes the relevant lines in this summary line is displayed. Its screen basically a master-detail - however the source of these two sets of data is just a query - is not a table.

    The query at the top of the page is something like

    Select * summary

    and the section below is

    Select * from details where id = (the value of the id clicked in the summary above)

    This feels like it should be really easy (and indeed, it is for the tables through the apex of master-detail Wizard) - but I can't understand when the two sets of data are the result of queries.

    I can't seem to make reference to the elements of the page when it comes to a report and I think that I might need to go down a kind of dynamic route of actions and jquery, but I don't get very far very fast. I found some notes that seem similar, but nothing which does exactly what I want. The function APEX_APPLICATION to browse a table also doesn't seem to be possible for the output report that I could see (tags are not there) - what is relevant for the forms?

    I hope that I have explained that quite simply.

    Can anyone help?

    See you soon,.

    Rich

    You link column can be just a null value in the sql code, if you want. Change the column and head down to the link attributes.

    Text link: "Click me" (source of sql using #MY_COL columns or #)

    Target: URL

    URL: javascript: $s ('P1_ITEM', #ID);

    Then have onChange dynamic action on P1_ITEM which updates the State. Do not forget to present the value of session state (either property right under the sql or pl/sql prior to update action report). The database needs to know the value of browser before running the query.

  • When you press the button

    Hi Experts,

    Thank you very much for you full support for those who are new to the apex.

    I have created a form in the apex oracle 4.2 and I need your help.

    In form10g, I used when-pressed button trigger and used this logic PLSQL.

    If: ca_gl.ca_type = 'G', and: ca_gl.ca_lvl = 1, then select max (ca_code) in the ca_gl cod

    where ca_type = 'G '.

    and substr (ca_code, 1, 1) = substr(:ca_gl.ca_code,1,1)

    and ca_lvl = 1;

    Do_Key ("duplicate_record");

    : ca_gl.ca_code: = key + 1;

    kindly guide me in the apex oracle 4.2 where I can write this code.

    In Oracle Apex, I created a button and together

    attributes HTML button

    Action when click the button Set by the dynamic action

    Condition PLSQL

    SELECT max (ca_code) + 1 ca_gl

    where ca_type = '

    and substr (ca_code, 1, 6) = substr(:p7ca_code,1,6);

    It is showing error:

    • ORA-06550: line 6, column 16: PLS-00103: encountered the symbol "SELECT" when expecting one of the following numbers: (- + new case mod not null < an ID > < a between double quote delimited identifiers of > < a variable binding > continue avg current County are min max sql prior stddev sum variance execute forall time timestamp interval date fusion < a literal string with character set the context of > < number >) < a SQL string between single quotes > hose < a literal string between quotes or set of characters (go to the error)

    kindly Guide

    Thank you very much. you have your point.

  • The procedure helps

    Hello

    Can someone help me with the procedure below. It seems to me, but I'm unable to turn it and get the error.

    "Error (8.36): PLS-00103: encountered the symbol"UNDER"when expecting one of the following conditions: (- + case null new mod continue County avg current prior min max sql stddev sum variance execute forall time timestamp interval date fusion pipe)"

    CREATE OR REPLACE PROCEDURE ddl_create_proc(p_table IN varchar2)
    AS
    i_stmt varchar2(200);
    BEGIN
    dbms_output.put_line('starting....');
    i_stmt := 'create table'||p_table||as 'select * from emp';
    execute immediate i_stmt;
    dbms_output.put_line('procedure Ended');
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('EXCEPTION '||SQLERRM||'MESSAGE'||SQLCODE);
    END;
    /
    
    

    Thanks in advance!

    Hello

    user782973 wrote:

    Hello

    Can someone help me with the procedure below. It seems to me, but I'm unable to turn it and get the error.

    "Error (8.36): PLS-00103: encountered the symbol"UNDER"when expecting one of the following conditions: (- + case mod new null continue County avg current min max sql prior stddev sum variance execute forall time timestamp interval date fusionpipe" ").

    1. CREATE OR REPLACE PROCEDURE ddl_create_proc (p_table IN varchar2)
    2. AS
    3. i_stmt varchar2 (200);
    4. BEGIN
    5. dbms_output.put_line ('starting...');
    6. i_stmt: = 'create table ' | p_table | as ' select * from emp';
    7. immediately run i_stmt;
    8. dbms_output.put_line ("'procedure completed");
    9. EXCEPTION
    10. WHILE OTHERS THEN
    11. dbms_output.put_line ('EXCEPTION' |) SQLERRM | ' MESSAGE' | SQLCODE);
    12. END;
    13. /

    Thanks in advance!

    In addition to what others have said, whenever you do the dynamic SQL code, display the value chain before you run it, like this:

    CREATE OR REPLACE PROCEDURE ddl_create_proc (p_table IN varchar2)

    AS

    i_stmt varchar2 (200);

    BEGIN

    dbms_output.put_line ('go... ») ;

    i_stmt: = 'create table ' | p_table | ' in select * from emp';

    dbms_output.put_line (i_stmt |) '= i_stmt in ddl_create_proc");  -For debugging

    immediately run i_stmt;

    dbms_output.put_line ('procedure completed");

    END ddl_create_proc;

    /

    After the test is finished, you can comment out the line marked "for debugging.

    You need an EXCEPTION section.  If there is an error, the error message will be displayed by default; you don't need to explicitly show.

    What is the big picture here?  What is this procedure intended to do?  There may already be a procedure provided by Oracle that the fact, perhaps in dbms_metadata:

    DBMS_METADATA

  • HLP with APEX WWV_FLOW

    Hello all, I have created a master/detail tabular form which process the data to update a State of a type error. This button update work process or when the line to update or process are less than 60 lines. Bothe the button update or the pl/sql process work very well. but when the error type is over 80 lines, the process will not treat and will bring a white page with WWV_FLOW. ACCEPT in the URL. Seeking with debug, I found the entrance to log below message. Can someone help me with this. Whatthis message really mean? with the exception of PL/SQL logging in final_exception_handler: Sqlerrm: ORA-20987: APEX - calculation of the error during the treatment. -ORA-06550: line 1, column 43: PLS-00103: encountered the symbol "&" when expecting one of the following numbers: (- + new case mod not null < an ID > < a between double quote delimited identifiers of > < a variable binding > continue avg current County are min max sql prior stddev sum variance execute forall time timestamp interval date fusion < a literal string with character set the context of > < a > <) a Backtrace TR: ORA-06512: at the 'APEX_040200.WWV_FLOW_ERROR' of the line 630 ORA-06512: at the 'APEX_040200.WWV_FLOW_ERROR' of the line 911 ORA-06512: at the "APEX_040200.WWV_FLOW_COMPUTATION", line 257 ORA-06512: at the "APEX_040200.WWV_FLOW", line 6356 ORA-06512: 'APEX_040200.WWV_FLOW', line 6368 here's my process using PL/SQL begin update ERROR_RELIEF_REQUEST set ERROR_RELIEF_STATUS = : P16_UPDATE_STATUS, USER_COMMENTS =: P16_COMMENTS WHERE INST_ID select =: P4_INSTITUTIONS and err_relief_status IN ('pending', 'DENIED') and error_code =: P16_ERROR_TYPE; : P16_COMMENTS: = "; : P16_UPDATE_STATUS: = 'PENDING '; end; Can anyone help?

    This is the process that run to update the database table. I'm trying to understand, why it updates the table with lines that are belo 70 and all what exceeds 70 it does not update? My question is also that whn there is syntax error, the program should run? or if there are syntax error, it shouldn't work at all? Here is the code in the process. I have it to modified

    Start update ERROR_RELIEF_REQUEST set ERROR_RELIEF_STATUS =: P16_UPDATE_STATUS, USER_COMMENTS =: P16_COMMENTS WHERE INST_ID select =: P16_INSTITUTION and err_relief_status IN ('pending', 'DENIED') and error_code =: P16_ERROR_TYPE;   : P16_COMMENTS: = ";   : P16_UPDATE_STATUS: = 'PENDING '; end;

  • Apex 4: conditional display substitution strings

    Hello

    I have a replacement string defined in apex 4:

    Substitution string: NOT_IN_EXCEL
    Replacement value: instr (nvl(:REQUEST,'FOO'), 'FLOW_EXCEL') = 0

    Now when I try to use this substitution string to a condition, for example on a column of the report, I get an error:

    Condition type: PL/SQL Expression
    Expression 1: & NOT_IN_EXCEL.

    Error message:

    ORA-06550: line 4, column 18: PLS-00103: encountered the symbol "&" when expecting one of the following numbers: (- + new case mod not null < an ID > < a between double quote delimited identifiers of > < a variable binding > continue avg current County are min max sql prior stddev sum variance execute forall time timestamp interval date fusion < a literal string with character set the context of > < a > <) a SQL string between single quotes > hose < a literal string between double quotes otherwise spec character set


    With the help of a chain of substitution in this way in Apex 3.2.1 works without problem.

    Thanks for the help in advance,
    Dirk

    Hello

    1. change the Item Page and scroll up to where you have the Condition
    2. check do validate not (code analysis during execution only). checkbox, and then apply the changes

    Substitution strings to continue to work as before in 4.x

    Concerning

  • ADF: Procedure to Pl/sql call prior to the loading of the page.

    Hello world

    I have a requirement to call a Pl/sql procedure prior to the loading of the page. I saw in google everywhere he gave to AMImpl but I want to call the Pl/sql procedure in init method().
    The procedure includes four SETTINGS.

    How can I do this?

    Wat should be the code?

    Please, help me get out of very new this.im for the ADF.

    Thank you.

    Dear user,

    Learn little by little the Big :) Book Oracle jdeveloper. It will help you.

    Articles of beautiful I can't forget never. :) thank us for these blogerr
    http://andrejusb.blogspot.in/2011/04/invoking-stored-procedures-and.html
    http://www.baigzeeshan.com/2010/05/calling-PLSQL-procedure-and-function-in.html

  • Call Package PL/SQL procedure via a url (prior R12 through "Enabled/pl/sql")

    All the

    Prior R12:
    This could be achievied through registration of your 'Package.Procedure' in the ' allowed Web PL/SQL "-screen." " Then the Package.Procedure could be called as: http://find-151.cmcdev.be:8004/pls/find/XXIE_INTERFACE.SHOWINTERFACELOG?p_itemkey=INFILE-454613-3074 & p_interfdef = EDG...


    In R12:
    I am looking for a way to do it, but after registering the PL/SQL in the table of this way of working always returns: "Page not found".


    Someone has additional information on this subject on how to proceed in R12, that I can't find any documentation, examples for this?


    Concerning
    Laura Olivier

    MOD_PLSQL is no longer available in R12. PL see ML Doc 726711.1 (Mod_plsql and Oracle E-Business Suite Release 12)

    HTH
    Srini

  • 2013 SharePoint will not correctly configure IIS during the prior installation on Server 2012 R2 Datacenter

    I'm currently trying to install SharePoint 2013 on 2012 R2 Datacenter Server. I have SQL 2012 with SP1. I tried to install the prerequisite several times and continue to receive an error during the configuration of IIS. Here is the log file:

    2015-06-11 16:58:41 - processor architecture is (9)
    2015-06-11 16:58:41 - read the following string value/name...
    2015-06-11 16:58:41 - common startup
    2015-06-11 16:58:41 - from the following registry location...
    2015-06-11 16:58:41 - SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell folders
    2015 06-11 16:58:41 - the value is...
    2015-06-11 16:58:41 - C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
    2015-06-11 16:58:41 - try to remove the start task if there is place.
    2015-06-11 16:58:41 - C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\SharePointServerPreparationToolStartup_0FF1CE14-0000-0000-0000-000000000000.cmd
    2015-06-11 16:58:41 - error: there is no startup task. This is not a continuation after a reboot.
    2015-06-11 16:58:41 - analyze the following command-line argument:
    2015-06-11 16:58:41 - /SQLNCli:c:\sharepoint2013bits\PrerequisiteInstallerFiles\sqlncli.msi
    2015-06-11 16:58:41 - found the following command-line option:
    2015-06-11 16:58:41 - SQLNCli
    2015-06-11 16:58:41 - found the following custom file location:
    2015-06-11 16:58:41 - c:\sharepoint2013bits\PrerequisiteInstallerFiles\sqlncli.msi
    2015-06-11 16:58:41 - analyze the following command-line argument:
    2015-06-11 16:58:41 - /IDFX:c:\sharepoint2013bits\PrerequisiteInstallerFiles\Windows6.1-KB974405-x64.msu
    2015-06-11 16:58:41 - found the following command-line option:
    2015-06-11 16:58:41 - IDFX
    2015-06-11 16:58:41 - found the following custom file location:
    2015-06-11 16:58:41 - c:\sharepoint2013bits\PrerequisiteInstallerFiles\Windows6.1-KB974405-x64.msu
    2015-06-11 16:58:41 - analyze the following command-line argument:
    2015-06-11 16:58:41 - /IDFX11:c:\sharepoint2013bits\PrerequisiteInstallerFiles\MicrosoftIdentityExtensions-64.msi
    2015-06-11 16:58:41 - found the following command-line option:
    2015-06-11 16:58:41 - IDFX11
    2015-06-11 16:58:41 - found the following custom file location:
    2015-06-11 16:58:41 - c:\sharepoint2013bits\PrerequisiteInstallerFiles\MicrosoftIdentityExtensions-64.msi
    2015-06-11 16:58:41 - analyze the following command-line argument:
    2015-06-11 16:58:41 - /Sync:c:\sharepoint2013bits\PrerequisiteInstallerFiles\Synchronization.msi
    2015-06-11 16:58:41 - found the following command-line option:
    2015-06-11 16:58:41 - Sync
    2015-06-11 16:58:41 - found the following custom file location:
    2015-06-11 16:58:41 - c:\sharepoint2013bits\PrerequisiteInstallerFiles\Synchronization.msi
    2015-06-11 16:58:41 - analyze the following command-line argument:
    2015-06-11 16:58:41 - /AppFabric:c:\sharepoint2013bits\PrerequisiteInstallerFiles\WindowsServerAppFabricSetup_x64.exe
    2015-06-11 16:58:41 - found the following command-line option:
    2015-06-11 16:58:41 - AppFabric
    2015-06-11 16:58:41 - found the following custom file location:
    2015-06-11 16:58:41 - c:\sharepoint2013bits\PrerequisiteInstallerFiles\WindowsServerAppFabricSetup_x64.exe
    2015-06-11 16:58:41 - analyze the following command-line argument:
    2015-06-11 16:58:41 - /KB2671763:c:\sharepoint2013bits\PrerequisiteInstallerFiles\AppFabric1.1-RTM-KB2671763-x64-ENU.exe
    2015-06-11 16:58:41 - found the following command-line option:
    2015-06-11 16:58:41 - KB2671763
    2015-06-11 16:58:41 - found the following custom file location:
    2015-06-11 16:58:41 - c:\sharepoint2013bits\PrerequisiteInstallerFiles\AppFabric1.1-RTM-KB2671763-x64-ENU.exe
    2015-06-11 16:58:41 - analyze the following command-line argument:
    2015-06-11 16:58:41 - /MSIPCClient:c:\sharepoint2013bits\PrerequisiteInstallerFiles\setup_msipc_x64.msi
    2015-06-11 16:58:41 - found the following command-line option:
    2015-06-11 16:58:41 - MSIPCClient
    2015-06-11 16:58:41 - found the following custom file location:
    2015-06-11 16:58:41 - c:\sharepoint2013bits\PrerequisiteInstallerFiles\setup_msipc_x64.msi
    2015-06-11 16:58:41 - details of the current operating system:
    2015-06-11 16:58:41 - the operating system major version number: (6)
    2015-06-11 16:58:41 - minor version of the operating system number: (2)
    2015-06-11 16:58:41 - Build number of the operating system: (0X23F0 = 9200)
    2015-06-11 16:58:41 - the latest Service Pack major version number: (0)
    2015-06-11 16:58:41 - the latest Service Pack minor version number: (0)
    2015-06-11 16:58:41 - ID of the operating system platform: (2)
    2015-06-11 16:58:41 - suites of products available in the operating system: (0 X 190 = 400)
    2015-06-11 16:58:41 - operating system product type: VER_NT_SERVER
    2015-06-11 16:58:41 - product type: (8)
    2015-06-11 16:58:41 - type of OS: (0)
    2015-06-11 16:58:41 - configuration of the property sheet for the application.
    2015-06-11 16:58:41 - check if the following condition is installed:
    2015-06-11 16:58:41 - Windows Management Framework 3.0
    2015-06-11 16:58:41 - read the following string value/name...
    2015-06-11 16:58:41 - PowerShellVersion
    2015-06-11 16:58:41 - from the following registry location...
    2015-06-11 16:58:41 - SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine
    2015 06-11 16:58:41 - the value is...
    2015-06-11 16:58:41-4.0
    2015-06-11 16:58:41 - a newer version of the above condition is already installed
    2015-06-11 16:58:41 - check if the following condition is installed:
    2015-06-11 16:58:41 - Microsoft .NET Framework 4.5
    2015-06-11 16:58:41 - read the following DWORD value name...
    2015-06-11 16:58:41 - install
    2015-06-11 16:58:41 - from the following registry location...
    2015-06-11 16:58:41 - SOFTWARE\Microsoft\Net framework Setup\NDP\V4\full
    2015-06-11 16:58:41 - the value is (1)
    2015-06-11 16:58:41 - read the following string value/name...
    2015-06-11 16:58:41 - version
    2015-06-11 16:58:41 - from the following registry location...
    2015-06-11 16:58:41 - SOFTWARE\Microsoft\Net framework Setup\NDP\V4\full
    2015 06-11 16:58:41 - the value is...
    2015-06-11 16:58:41-4.5.51650
    2015-06-11 16:58:41 - mail .NET 4.5 release is installed
    2015-06-11 16:58:41 - check if the following condition is installed:
    2015-06-11 16:58:41 - Windows Identity Foundation (KB974405)
    2015-06-11 16:58:41 - read the following string value/name...
    2015-06-11 16:58:41-
    2015-06-11 16:58:41 - from the following registry location...
    2015-06-11 16:58:41 - SOFTWARE\Microsoft\Windows identity Foundation\Setup\v3.5
    2015 06-11 16:58:41 - the value is...
    2015-06-11 16:58:41-6.1.7600.0
    2015-06-11 16:58:41 - the above condition is already installed
    2015-06-11 16:58:41 - check if the following condition is installed:
    2015-06-11 16:58:41 - Microsoft Sync Framework Runtime v1.0 (x 64) SP1
    2015-06-11 16:58:41 - reading version of the following file...
    2015-06-11 16:58:41 - C:\Windows\assembly\GAC_MSIL\Microsoft.Synchronization\1.0.0.0__89845dcd8080cc91\Microsoft.Synchronization.dll
    2015-06-11 16:58:41 - GetFileVersionInfoSize failed (-2147024894)
    2015-06-11 16:58:41 - check if the following condition is installed:
    2015-06-11 16:58:41 - client native Microsoft SQL Server 2008 R2 SP1
    2015-06-11 16:58:41 - read the following string value/name...
    2015-06-11 16:58:41 - version
    2015-06-11 16:58:41 - from the following registry location...
    2015-06-11 16:58:41 - SOFTWARE\Microsoft\Microsoft SQL Server\SQLNCLI10\CurrentVersion
    2015-06-11 16:58:41 - check if the following condition is installed:
    2015-06-11 16:58:41 - Windows Server AppFabric
    2015-06-11 16:58:41 - read the following string value/name...
    2015-06-11 16:58:41 - ProductVersion
    2015-06-11 16:58:41 - from the following registry location...
    2015-06-11 16:58:41 - SOFTWARE\Microsoft\AppFabric\V1.0
    2015-06-11 16:58:41 - check if the following condition is installed:
    2015-06-11 16:58:41 - Windows Identity Foundation (KB974405)
    2015-06-11 16:58:41 - read the following string value/name...
    2015-06-11 16:58:41-
    2015-06-11 16:58:41 - from the following registry location...
    2015-06-11 16:58:41 - SOFTWARE\Microsoft\Microsoft identity Extensions\Setup\1.0
    2015-06-11 16:58:41 - check if the following condition is installed:
    2015 06-11 16:58:41 - Microsoft Protection information and Control Client
    2015-06-11 16:58:41 - read the following string value/name...
    2015-06-11 16:58:41-
    2015-06-11 16:58:41 - from the following registry location...
    2015-06-11 16:58:41 - SOFTWARE\Microsoft\MSIPC\CurrentVersion
    2015-06-11 16:58:41 - check if the following condition is installed:
    2015-06-11 16:58:41 - Microsoft WCF Data Services 5.0
    2015-06-11 16:58:41 - read the following string value/name...
    2015-06-11 16:58:41 - version
    2015-06-11 16:58:41 - from the following registry location...
    2015-06-11 16:58:41 - SOFTWARE\Wow6432Node\Microsoft\Microsoft WCF Data Services\5.0
    2015-06-11 16:58:41 - check if the following condition is installed:
    2015-06-11 16:58:41 - update Cumulative Package 1 for Microsoft AppFabric 1.1 for Windows Server (KB2671763)
    2015-06-11 16:58:41 - read the following DWORD value name...
    2015-06-11 16:58:41 - IsInstalled
    2015-06-11 16:58:41 - from the following registry location...
    2015-06-11 16:58:41 - SOFTWARE\Wow6432Node\Microsoft\Updates\AppFabric 1.1 for Windows Server\KB2671763
    2015-06-11 16:58:46 - start download/install
    2015-06-11 16:58:46 - created the thread for the installer
    2015-06-11 16:58:47 - "C:\Windows\system32\ServerManagerCmd.exe" - inputpath 'C:\Users\ADMINI~1\AppData\Local\Temp\1\PreF30A.tmp.XML '.
    2015-06-11 16:58:47 - error: cannot install (2)
    2015-06-11 16:58:47 - error: [in HRESULT format] (-2147024894)
    2015-06-11 16:58:47 - last return code (2)
    2015-06-11 16:58:47 - read the following DWORD value name...
    2015-06-11 16:58:47 - flags
    2015-06-11 16:58:47 - from the following registry location...
    2015-06-11 16:58:47 - SOFTWARE\Microsoft\Updates\UpdateExeVolatile
    2015-06-11 16:58:47 - read the following string value/name...
    2015-06-11 16:58:47 - PendingFileRenameOperations
    2015-06-11 16:58:47 - from the following registry location...
    2015-06-11 16:58:47 - SYSTEM\CurrentControlSet\Control\Session Manager
    2015-06-11 16:58:47 - read the following registry location...
    2015-06-11 16:58:47 - SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired
    2015-06-11 16:58:47 - error: the tool was unable to install the Application Server role (IIS) Web server role.
    2015-06-11 16:58:47 - last return code (2)
    2015-06-11 16:58:47 - options for other diagnostics: 1. find the value of return code 2. Download the prerequisite manually and check the size uploaded by prior Setup. 3. install the prerequisites manually from the location given without any command line options.
    2015-06-11 16:58:47 - can't start over
    2015-06-11 16:58:47 - check if the following condition is installed:
    2015-06-11 16:58:47 - Windows Management Framework 3.0
    2015-06-11 16:58:47 - read the following string value/name...
    2015-06-11 16:58:47 - PowerShellVersion
    2015-06-11 16:58:47 - from the following registry location...
    2015-06-11 16:58:47 - SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine
    2015 06-11 16:58:47 - the value is...
    2015-06-11 16:58:47-4.0
    2015-06-11 16:58:47 - a newer version of the above condition is already installed
    2015-06-11 16:58:47 - check if the following condition is installed:
    2015-06-11 16:58:47 - Microsoft .NET Framework 4.5
    2015-06-11 16:58:47 - read the following DWORD value name...
    2015-06-11 16:58:47 - install
    2015-06-11 16:58:47 - from the following registry location...
    2015-06-11 16:58:47 - SOFTWARE\Microsoft\Net framework Setup\NDP\V4\full
    2015-06-11 16:58:47 - the value is (1)
    2015-06-11 16:58:47 - read the following string value/name...
    2015-06-11 16:58:47 - version
    2015-06-11 16:58:47 - from the following registry location...
    2015-06-11 16:58:47 - SOFTWARE\Microsoft\Net framework Setup\NDP\V4\full
    2015 06-11 16:58:47 - the value is...
    2015-06-11 16:58:47-4.5.51650
    2015-06-11 16:58:47 - mail .NET 4.5 release is installed
    2015-06-11 16:58:47 - check if the following condition is installed:
    2015-06-11 16:58:47 - Windows Identity Foundation (KB974405)
    2015-06-11 16:58:47 - read the following string value/name...
    2015-06-11 16:58:47-
    2015-06-11 16:58:47 - from the following registry location...
    2015-06-11 16:58:47 - SOFTWARE\Microsoft\Windows identity Foundation\Setup\v3.5
    2015 06-11 16:58:47 - the value is...
    2015-06-11 16:58:47-6.1.7600.0
    2015-06-11 16:58:47 - the above condition is already installed
    2015-06-11 16:58:47 - check if the following condition is installed:
    2015-06-11 16:58:47 - Microsoft Sync Framework Runtime v1.0 (x 64) SP1
    2015-06-11 16:58:47 - reading version of the following file...
    2015-06-11 16:58:47 - C:\Windows\assembly\GAC_MSIL\Microsoft.Synchronization\1.0.0.0__89845dcd8080cc91\Microsoft.Synchronization.dll
    2015-06-11 16:58:47 - GetFileVersionInfoSize failed (-2147024894)
    2015-06-11 16:58:47 - check if the following condition is installed:
    2015-06-11 16:58:47 - client native Microsoft SQL Server 2008 R2 SP1
    2015-06-11 16:58:47 - read the following string value/name...
    2015-06-11 16:58:47 - version
    2015-06-11 16:58:47 - from the following registry location...
    2015-06-11 16:58:47 - SOFTWARE\Microsoft\Microsoft SQL Server\SQLNCLI10\CurrentVersion
    2015-06-11 16:58:47 - check if the following condition is installed:
    2015-06-11 16:58:47 - Windows Server AppFabric
    2015-06-11 16:58:47 - read the following string value/name...
    2015-06-11 16:58:47 - ProductVersion
    2015-06-11 16:58:47 - from the following registry location...
    2015-06-11 16:58:47 - SOFTWARE\Microsoft\AppFabric\V1.0
    2015-06-11 16:58:47 - check if the following condition is installed:
    2015-06-11 16:58:47 - Windows Identity Foundation (KB974405)
    2015-06-11 16:58:47 - read the following string value/name...
    2015-06-11 16:58:47-
    2015-06-11 16:58:47 - from the following registry location...
    2015-06-11 16:58:47 - SOFTWARE\Microsoft\Microsoft identity Extensions\Setup\1.0
    2015-06-11 16:58:47 - check if the following condition is installed:
    2015-06-11 16:58:47 - Microsoft Information Protection and Control Client
    2015-06-11 16:58:47 - read the following string value/name...
    2015-06-11 16:58:47-
    2015-06-11 16:58:47 - from the following registry location...
    2015-06-11 16:58:47 - SOFTWARE\Microsoft\MSIPC\CurrentVersion
    2015-06-11 16:58:47 - check if the following condition is installed:
    2015-06-11 16:58:47 - Microsoft WCF Data Services 5.0
    2015-06-11 16:58:47 - read the following string value/name...
    2015-06-11 16:58:47 - version
    2015-06-11 16:58:47 - from the following registry location...
    2015-06-11 16:58:47 - SOFTWARE\Wow6432Node\Microsoft\Microsoft WCF Data Services\5.0
    2015-06-11 16:58:47 - check if the following condition is installed:
    2015-06-11 16:58:47 - update Cumulative Package 1 for Microsoft AppFabric 1.1 for Windows Server (KB2671763)
    2015-06-11 16:58:47 - read the following DWORD value name...
    2015-06-11 16:58:47 - IsInstalled
    2015-06-11 16:58:47 - from the following registry location...
    2015-06-11 16:58:47 - SOFTWARE\Wow6432Node\Microsoft\Updates\AppFabric 1.1 for Windows Server\KB2671763
    2015-06-11 16:58:56 - opening the log file
    2015-06-11 16:58:56 - open for user action
    2015-06-11 16:58:56 - C:\Users\ADMINI~1\AppData\Local\Temp\1\PrerequisiteInstaller.2015.06.11-16.58.41.log

    I also looked for a solution of TechNet and found that there is a KB to install (2771431) (located here: https://support.microsoft.com/en-us/kb/2765260?wa=wsignin1.0 ), but when I try to install it I get the following error: "the update is not applicable to your computer. I also tried the second step, if the installation does not work and it has not yet. Any help would be greatly appreciated. Thank you.

    This issue is beyond the scope of this site and must be placed on Technet or MSDN
  • Using Microsoft SQL Server SP2 2012 and update KB2793634

    I'm in control of several servers that are running Microsoft SQL Server SP1 2012. One of these servers is broken to cause the same symptoms as KB2793634 ( http://www.microsoft.com/en-us/download/details.aspx?id=36215 ) fixes. This error is due to the installation of SP1 (which has been done on all servers) and will come into action later. I'm afraid that the other servers will be in shortly.

    Prior to this fix, I applied 2012 SP2 of Microsoft SQL Server on the server with the issue in the hope of resolving this. KB2793634 is now unable to run on this server because it is compatible with the SQL SP1. So my question is:

    SP2 includes KB2793634? I want this problem to be addressed before the other servers are affected as this first, then should I install SP2 or just install KB2793634 on other servers?

    Thank you very much, I hope that all the senses. If it's in the wrong place, can you please direct me to where I can ask SQL related questions?

    Ask the question in the SQL Server forums:
    http://social.msdn.Microsoft.com/forums/SQLServer/en-us/home?category=SQLServer

  • SQL Server 2008 R2 error fix 18056

    How can solve us the issue mentioned below in SQL Server 2008 R2.

    The client failed to reuse a session with SPID XX, which was returned to the connection pool. This error may be due to earlier malfunction. Check the error for the failed operations logs just prior to this error message.

    Kind regards

    Rashid

    Thanks for visiting the site of the community of Microsoft Windows. The question you have posted is related to SQL Server 2008 and would be better suited to the MSDN Community. Please visit the link below to find a community that will provide the support you want.
    http://social.msdn.Microsoft.com/forums/en/category/SQLServer
  • Services for SQL Server 2008 Express are not listed. No error message when installing.

    Hello community,

    I installed SQL Server Express 2008 (without SP but with SQL Management Studio) on a Windows XP 2002 SP3 32-bit. Used to install operating system user is a member of the administrator group
    The SQLManagementStudio_x86_ENU.exe installation file was downloaded from http://www.microsoft.com/en-us/download/details.aspx?id=7593 . Express Edition has been selected during the installation. All prior checks have been adopted (with the exception of 1 and 2 does not apply). I chose this version with management tools that I will need them for a quick change at a later stage.

    Then I installed on SQLServer2008SP1-KB968369 - x 86 - ENU.exe, which is the general Service Pack 1 for SQL Server 2008, which has been downloaded from http://www.microsoft.com/en-us/download/details.aspx?id=20302. All prior checks have been adopted (with the exception of 1 and 2 does not apply). The installation window title was SQL Server Service Pack 1. In the step select the components, I had no other choice than the selection of shared components / basic management tools. To the right of the screen, it says "Express with Advanced Services" edition / Patch level: 10.0.1600.22

    It ended with a message saying that your SQL Server 2008 upgrade completed successfully. The information contained in the mentioned log at the end of the installation displays no error message.

    Here is the troubled part

    Then I tried to install a different SW that has SQL Server 2008 SP1 as a sine qua non. What he did not. Then I rebooted and wanted to see what version was indeed installed.

    Control Panel - Add/Remove software : 5 entries, Microsoft SQL Server 2005 backward compatibility / Microsoft SQL Server 2008 / Microsoft SQL Server 2008 Native Client / Microsoft SQL Server 2008 political / setup of Microsoft SQL Server 2008 supports files (no mention of SP1, can this be correct?)
    Control Panel - Services : there is no service of any kind that has SQL Server on its behalf. This is very probably a major problem, a google for that advice that there should be more of them
    Regedit - HKLM - SW-MS - MS SQL Server - 100 - Bootstrap Release - current Version : 10.1.2531.0 (Diffferent than SP1, think?)
    Cmd - osql-u its Pei : named pipes provider: could not open a connection to SQL Server [2]. / Login timeout expired

    I reboot several times since then.
    I don't know the status of the installation before installing the SP1, I knew I'd need SP1 anyway.

    I suppose that services SQL Server issue resolved would be a big step forward.

    Anyone has an idea on what I could check?

    Thanks in advance, Laurent

    SUPPORT IS LOCATED IN THE SQL SERVER FORUM:
    http://social.msdn.Microsoft.com/forums/en/category/SQLServer

  • Problem with hierarchical query in function PL\SQL

    I have a simple table containing the ID of the parent

    -Create table

    create the table1 table:

    (

    ID NUMBER (12) not null,

    year number 4.

    month NUMBER (2),

    parent_id NUMBER (12)

    );

    -Create/recreate primary, unique and foreign key constraints

    change the table1 table:

    Add primary key constraint PK_TABLE1 (ID);

    change the table1 table:

    Add the foreign key constraint FK_TABLE1_PARENT (PARENT_ID)

    reference TABLE1 (ID);

    data:

    Insert into TABLE1 (id, year, month, parent_id)

    values (5, 2015, 12, 3);

    Insert into TABLE1 (id, year, month, parent_id)

    values (6 (2015), 12, 4);

    Insert into TABLE1 (id, year, month, parent_id)

    values (3 (2015), 11, 1);

    Insert into TABLE1 (id, year, month, parent_id)

    values (4 (2015), 11, 2);

    Insert into TABLE1 (id, year, month, parent_id)

    values (1, 2015, 10, null);

    Insert into TABLE1 (id, year, month, parent_id)

    values (2 (2015), 10, null);

    commit;

    and query

    with h as

    (select t.id, t.year, t.month, CONNECT_BY_ROOT t.id as parent_id from table1 t

    where t.year = 2015 and t.month = 12

    and CONNECT_BY_ROOT t.year = 2015 and CONNECT_BY_ROOT t.month = 10

    connect by prior t.id = t.parent_id)

    Select * from:

    Join table1 t left t.id = h.parent_id;

    It works, but when I put this request in the procedure pl\sql

    create or replace procedure is get_report (p_cur_out on sys_refcursor)

    Start

    Open the p_cur_out for

    with h as

    (select t.id, t.year, t.month, CONNECT_BY_ROOT t.id as parent_id from table1 t

    where t.year = 2015 and t.month = 12

    and CONNECT_BY_ROOT t.year = 2015 and CONNECT_BY_ROOT t.month = 10

    connect by prior t.id = t.parent_id)

    Select * from:

    Join table1 t left t.id = h.parent_id;             

    end get_report;

    /

    They do not compile. And in the fall, with the exception

    Errors of compilation for the PC of the PROCEDURE. GET_REPORT

    [Error: PL/SQL: ORA-00600: internal error code, arguments: [qctcte1], [0], [], [], [], [], [], [], [], [], []]

    Online: 6

    Text: with h as

    Error: PL/SQL: statement ignored

    Online: 6

    Text: with h as

    My version of oracle

    1Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production
    2PL/SQL Release 11.2.0.3.0 - Production
    3CORE Production 11.2.0.3.0
    4AMT for Linux: Version 11.2.0.3.0 - Production
    5NLSRTL Version 11.2.0.3.0 - Production

    What is the problem with my request? Or database? How to solve this problem?

    If you have access to MOS, you can search the reason of it. If you are using left join syntax instead of joining ANSI, owner Oracle procedure compiles and returns the result.

  • SQL query to create artificial lines (performance)

    Database: Oracle 11g

    with tab1 as  
    (select 1 sequence_num,'p1' productid, 'jm1' job_master_id, 'jm11' job_id, 'insert' status  
        from dual  
      union all  
      select 2 sequence_num,'p1' productid, 'jm1' job_master_id, 'jm12' job_id, 'insert' status  
        from dual  
      union all  
      select 3 sequence_num, 'p1' productid,'jm1' job_master_id, 'jm13' job_id, 'insert' status  
        from dual  
      union all  
      select 4 sequence_num, 'p1' productid, null job_master_id, 'jm1' job_id, 'master_removed' status  
        from dual  
        union all  
        select 1 sequence_num,'p2' productid, 'jm2' job_master_id, 'jm21' job_id, 'insert' status  
        from dual  
        )  
    select * from tab1
    
    

    fr1.PNG

    the above is a table of operation for a given productid. for each master job there are jobs of the child and for each child employment there is an entry for insertion. When we remove the master station we only store one record for the id of the job to master an integer. However in some reports we show each child job id with a status being removed as the below. basically for each logical record that created the deleted entry will be the sequence number of the main entrance. in this example sequence # 4. tab1 is a very large table.


    fr2.PNG

    my query:

    1. with tab1 as 
    2. (Select 1 sequence_num"p1" productid, 'jm1' job_master_id, 'jm11' job_id, "insert" State
    3. de double
    4. Union all 
    5. Select 2 sequence_num 'p1' ProductID, 'jm1' job_master_id, "jm12" job_id, "Insert" status
    6. deUnion all 
    7. Select sequence_num 3, 'p1' ProductID, « jm1 » job_master_id, "jm13" job_id, "Insert" status
    8. de double
    9. Union all 
    10. Select sequence_num 4, 'p1' ProductID, null job_master_id, 'jm1' job_id, "master_removed" status
    11. de double
    12. Union 
    13. Select 1 sequence_num 'p2' ProductID, « jm2 » job_master_id, "jm21" job_id, "Insert" status
    14. de double
    15. )
    16. Select * de
    17. Select a.*, 'physical' record de tab1 a
    18. Union all 
    19. Select del.sequence_num,
    20. b.ProductID,
    21. b.job_master_id,
    22. 'logic' record
    23. de 
    24. tab1 del, tab1 b
    25. del.ProductID = b.productid
    26. et del.job_id = b.job_master_id
    27. et del.status = "master_removed" 
    28. et b.status = "Insert" ) final
    29. order of final.productid, final.job_master_id, final.job_id
    30. Can rewrite us this query with just a single select statement with three full table on the same table scans? Something using connectby or connector line... Thanks in advance...

      Something like:

      with tab1 as)

      Select 1 sequence_num, productid 'p1', 'jm1' job_master_id 'jm11', 'insert' Union status job_id double all the

      Select 2 sequence_num, productid 'p1', 'jm1' job_master_id job_id 'jm12","insert"status of double union all

      Select 3 sequence_num, productid 'p1', 'jm1' job_master_id job_id 'jm13', 'insert' status of double union all

      Select 4 sequence_num "p1" productid, job_master_id, job_id 'jm1' null, 'master_removed' status of all the double union

      Select 1 sequence_num "p2" productid, job_master_id 'jm2', 'jm21"job_id,"insert"status of double

      )

      Select sequence_num,

      ProductID,

      NVL (job_master_id, job_id) job_master_id.

      nvl2 (job_master_id, job_id, job_id prior) job_id,

      status,

      level of the case

      When 1 then 'physical '.

      otherwise "logic."

      end record

      of tab1

      connect by productid = ProductID prior

      and job_id = prior job_master_id

      and the State = "master_removed".

      order by productid,

      job_master_id,

      job_id

      /

      SEQUENCE_NUM PR JOB_ JOB_ STATE REGISTRATION
      ------------ -- ---- ---- -------------- --------
      4 p1 jm1 jm11 logical master_removed
      1 p1 jm1 jm11 insert physical
      2 p1 jm1 jm12 insert physical
      4 p1 jm1 jm12 logical master_removed
      4 p1 jm1 jm13 logical master_removed
      3 p1 jm1 jm13 insert physical
      4 p1 jm1 physical master_removed
      1 p2 jm2 jm21 insert physical

      8 selected lines.

      SQL >

      SY.

    31. SQL query for the region of the tree

      Hello

      I was wondering if someone is able to help me work on a SQL query, to format the data in the table required in a part of the tree... I've never used a tree and I'm fighting to get the right data (if possible).

      The data in the table looks like this:

      data.PNG

      I want to put it in a tree, using level 1 level6 with a final layout that would look like this:

      tree.PNG

      As you can see, the data are formatted in level6 down in the tree, but are filled in the table from level 1. Not all of the columns will be filled, so level2 for anyone 4 (France) is the equivalent of level in the tree like level6 to person 1 (Spain).

      This is Apex 4.2.5

      Oracle 11.2.0.3.0

      Sample data:

      CREATE TABLE employees
         ( employee VARCHAR2(100),
           level1 VARCHAR2(100),
           level2 VARCHAR2(100),
           level3 VARCHAR2(100),
           level4 VARCHAR2(100),
           level5 VARCHAR2(100),
           level6 VARCHAR2(100)   
         );
      
      INSERT INTO employees (employee, level1, level2, level3, level4, level5, level6) VALUES ('Person1','Team One','Recruitment','Human Resources','Fictituous Company','Murcia','Spain');
      INSERT INTO employees (employee, level1, level2, level3, level4, level5, level6) VALUES ('Person2','Team Four','Testing','IT','Big Corporate','Hanover','Germany');
      INSERT INTO employees (employee, level1, level2, level3, level4, level5, level6) VALUES ('Person3','Big Corporate','Hanover','Germany', null, null, null);
      INSERT INTO employees (employee, level1, level2, level3, level4, level5, level6) VALUES ('Person4','Brittany','France', null, null, null, null);
      INSERT INTO employees (employee, level1, level2, level3, level4, level5, level6) VALUES ('Person5','Team Three','Testing','IT','Big Corporate','Hanover','Germany');
      INSERT INTO employees (employee, level1, level2, level3, level4, level5, level6) VALUES ('Person6','Public Relations','Government Agency','Brittany','France', null, null);
      
      

      Added example given.

      Hello

      Apex-user wrote:

      Thanks Frank, this is a good example, I can work with that! Your assumptions are correct.

      A question I came, however, is that I have a data segment that comes across poorly formatted so to speak... where only the lower levels (1-2, etc.) have been filled from the bottom up.

      An example of this data would be:

      1. INSERT INTO employees (employee, level 1, 2, level3, level4, level5, level6) VALUES ('Person7', 'One Team', 'Test', null, null, null, null);

      As you can see that if you rerun the select, the test team is now duplicated, both at the level of the root in the tree as it should.

      You are not sure if the sql can be adjusted to account for this, or if it's too hard?

      It is obviously a question of data and I am trying to solve this separately (extracted data from another system out of my control).

      Thank you!

      Sorry, I'm confused.

      You say that my assumptions were correct.  What includes supported that "If test ' occurs under 'IT' in a row, then the extent of the 'Testing' occurs, it must be under"IT "?  Right after you say that assumptions are correct, you give an example where 'Testing' occurs under 'IT' to a single line, but it is not less 'IT' to another line and where is 'One Team' under 'Testing' in a line, but is 'One Team' under 'Recruitment' in another row.

      When a situation like this occurs, how you cope?  Whenever you have a problem, please post the exact results you want from the given sample data, and an explanation of how you get these results.  If you don't know about what would be the ideal results, or if you are flexible on the exact results, then at least give an example and explain your reasons.

      Maybe you want to change the got_parent of subquery like this:

      WITH unpivoted_data AS

      (

      SELECT *.

      Employees

      UNPIVOT (node_name

      FOR lvl (level1 AS 1

      level2 AS 2

      level3 AS 3

      level4 AS 4

      level5 AS 5

      level6 AS-6

      )

      )

      )

      got_parent AS

      (

      SELECT c.node_name

      MIN (p.node_name) AS a parent

      Of unpivoted_data c

      LEFT OUTER JOIN unpivoted_data p ON p.employee = c.employee

      AND p.lvl = c.lvl + 1

      GROUP BY c.node_name

      )

      SELECT LPAD (' ' ')

      2 * (LEVEL - 1)

      ) || Node_name AS entity

      OF got_parent

      START WITH parent IS NULL

      Parent = node_name PRIOR CONNECTION

      ;

      In this way, if 'Test' is current 'IT' in one line, but not under what in another line, whether under would consider the 'IT' request and not to be a root.  If 'One Team' sudden 'Testing' in a line, but under "Recruitment" in another line, it will be (arbitrarily) consider it under "recruitment".

Maybe you are looking for

  • Will this work?

    I posted there to lose the apps on my iMac and some works do not at all an hour. I did a disk check and everything was OK but the custom of Time Machine' open. Fortunately, I have a MacBook Pro that is almost a clone of the iMac. I use Dropbox to sto

  • Why are cookies not deleted when I close Firefox?

    Hey,. My problem is that I put Tools / Options / Privacy / history to "Use the custom settings for history", then under "cookies", I put keep up to the: to the "closing of Firefox". Yet, when I close my browser and restart any of the cookies are dele

  • error message saying "error loading wingsw32.rom the specific module was not found" whenever I boot my system

    wingsw32. ROM I get an error saying "error loading wingsw32.rom the specific module is not found" whenever I boot my system. Can someone help me in this. Thanks in advance!

  • How to reset outlook as my default e-mail in internet client explore win 7?

    I've always been able to right click on the Web page and send by e-mail outlook which is my default email client before to have someone clean up my computer, now when I right click I get 'e-mail with windows live' and there is no 'send' other than th

  • Broadcom NetXtreme II 5708C on PE2900 III

    I recently install Windows 2003 server on PE2900 and had bad install drivers for Broadcom NIC once I finally get installed them and working, I set up a static IP for one of the adapters and people with disabilities the 2nd adapter. When I do an ipcon