SQL logging for Transport to another network

Problem: We have an oracle database which receives all transactions from an application of BMC repair on the same network. We need to capture/transaction log, place them in the order in a flat file of some sort, transfer them to another network, and then apply them to the db replica in sequential order.

I went through the docs of LogMiner and other things, but I don't really see a solution. Data Guard will not help, because we can not maintain a connection to transport of newspapers of the previous day.

Our environment is Oracle 11 g R1.

Any suggestions would be much apprecieted.

Thank you
Justin B.

Taking a backup and sneakernetting that the destination network must only be done once during initial Setup. After that, you can just Sandalenet the archived log files, put Eve into recovery mode and what is it worth of newspapers. Any solution will be a first step, which is to restore some sort of backup as the starting point.

DCC requires a Subscriber, but should not be a different database. This is why I suggested it would be a separate program that you have written that agrees with the changes and wrote a flat file (XML or otherwise). You will then need an additional program on the destination network that could read your custom XML file and generate DML appropriate after you Sandalenet the XML file. Sneakernetting an XML file is likely to be more difficult than logs archived simply sneakernetting because XML will be much larger files. Therefore, you must also write a maintain the programs that read and write the XML. I'm hard-pressed to see how this would be the 'best' way for any reasonable definition of "best".

Justin

Tags: Database

Similar Questions

  • I used a time capsule in my house.  Now, I have another network put in place and would like to set my time for back ups and NOT as a WiFi capsule

    I used a time capsule in my house.  Now, I have another network put in place and would like to set my time for back ups and NOT as a WiFi capsule

    If it is possible to turn off the WiFi on the Time Capsule, which only leaves you with the option to back up your Mac (s) using a wired Ethernet cable connection between the Mac (s) and the Time Capsule.

    Are you OK with that?

  • When I log on my computer its is open for a minute and then a blue screen with error lights up and stops him. I can only log in safe mode of network.

    When I log on my computer its is open for a minute and then a blue screen with error lights and him stops

    I can only log in safe mode of network.

    original title: blue screen error

    If you can properly connect mode without failure, you can use "msconfig" to toggle various programs that load at startup.  Finally, find the one that is causing your program to crash.

    "How to solve configuration errors by using the System Configuration utility in Windows XP"
      <>http://support.Microsoft.com/kb/310560 >

    "System Configuration Utility overview"
      <>http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/msconfig_usage.mspx?mfr=true>

    HTH,
    JW

  • another network with my Ip address?

    A message appeared saying: "another network has the same IP as this PC, I checked the network administrator and conducted an audit and found no problems.

    I also checked for antivirus updates and no problems were found. I recently signed up for Yahoo. This has something to do with the IP address?

    Hello Silvia,.

    I don't see how to sign up for Yahoo this would cause.  Although this is stated in the reference below, it is IMPOSSIBLE to have two identical IP addresses on the internet.  There are sometimes common sense as well as the technical reasons for this. You can read or skip to the next section you choose covering some basic concepts of networking that can help as I don't know where you are in terms of networking knowledge. This could be much too basic or even above your head.  The answer to your question follows this section with an article that will probably the thing and then a search for related sites that cover this problem if this article isn't enough.

    ******************************************************************

    It is a phenomenon of local network because all local networks use one of three ranges for the allocation of addresses TCP/IP based on the number of computers should be connected.  For home use, it is usually begins with 192.168. and two other numbers that are limited by a set of rules.  Most people use 192.168.000.001 (or which is written 192.168.0.1 as address of the router (or gateway) and the local DHCP server, Server DNS and WINS Server (often assigned and controlled by the router, but sometimes by a computer instead for various reasons).  Then network (DHCP server) Configuration is used to assign a range of acceptable numbers for computers that use this number.

    Most people allow these numbers are dymically assigned by the DHCP server to keep things simple - so that a specific computer may change from time to time.  Some devices need an assigned static address (which is reserved for this device which always uses and nothing else is never assigned it on this network because two that are the same on the same network would have caused a problem such that the communication would not have an idea that you choose if selected).  An example might be a stand-alone network printer where the configuration of the printer on any computer using it could be a nightmare if not to change the address of the printer and that nobody was able to connect to it - then it becomes static and then all computers use this address and since it never changes which avoids printer problems.  Another example is the above router other than the same problems occur whenever the computers tried to connect to the internet or connect to what be it through the router.

    Now, if you have two LANs linked together, a problem starts to appear as both may have been implemented with the same philosophy and therefore likely to use the same numbers.  This is often done using a network http://www.ehow.com/how_5329107_use-router-bridge-two-networks.html bridge or can be done through complex subnets creation of each network (more complicated).

    For the more (and perhaps even to understand that, you need to understand the basics of networks.)  Here's a search to find some one who can help you get started: http://www.bing.com/search?q=networking%20basics%20tutorial&PQ=Networking%20basics%20&SP=2&QS=AS&SK=AS1&sc=16-26&form=BSRTSS&pc=BBSR.

    *******************************************************************

    Please see http://answers.microsoft.com/en-us/windows/forum/windows_other-networking/another-computor-is-using-same-ip-adress-as-my/84f10eec-9ff4-4d40-8867-392422367026 which should help explain some things about it (and even if in a forum of Vista, most if not all of it applies to networks in general - so don't worry that).

    Learn more (a lot more, actually) on both computers with the same ip address, see the following Bing search which will give you plenty of resources for this, why and how it happens and what to do when it comes to solving things: http://www.bing.com/search?q=two%20computers%20with%20same%20ip%20address&PQ=two%20computes%20with%20&SP=1&QS=SC&SK=&sc=16-34&form=BSRTSS&pc=BBSR.

    I hope this helps.

    Good luck!

    Kosh

  • Management of permissions for users on the network.

    Hello

    My question is General and related to xp and windows 7 as well.

    Can someone explain to me how to manage permissions for users on the network?  It's easy to do the job when I talk to local users, but I can't find a way to add computers to the dialog box object types. I have only options of theses: built-in security principals, users and groups. In the locations list, I see only my computer and cannot find how to add computers to all networks.

    Thank you

    For Windows XP, it makes a difference if "Simple file sharing" is enabled or disabled.  Simple file sharing is * always * activated if you have Windows XP Home Edition and it is the default setting in XP Pro.  Sharing files Simple enabled, * all * users who are connected to a network on your machine are forced to authenticate on the machine as the 'Guest' user - which means that you have no user authentication in Windows Home or XP Pro without disabling Simple file sharing.  This means that every network user has access only to files to the files which has permissions for the Guest user.

    If you have XP Pro and disable Simple file sharing, then you can ask users to authenticate on your local machine and give everyone access to its own set of file permissions.  If the user connects to a network computer that contains the same user name and password that the user is currently logged on the local computer, the authentication is automatic.

    "How to disable the file sharing simple and how to set permissions on a shared folder in Windows XP"

    <>http://support.Microsoft.com/kb/307874/en-us >

    HTH,

    JW

  • Access another network through VPN

    Hello, currently we have an easy vpn server in one of our sites. Remote users can access the LAN (172.17.x.x) through the VPN.  Is it possible to access another network (192.168.2.x) via the same VPN connection?  Please see the network diagram.

    Kind regards

    Tony

    Hello Tony

    Thank you for the config and details

    I've done the configuration in the assumption that the new subnet to which the VPN users wants to access is 192.168.2.0/24 and is behind the router Dlink

    VPN SERVER
    ----------------

    NZEV extended IP access list
    permit ip 192.168.2.0 0.0.0.255 any

    access-list 120 deny ip 192.168.2.0 0.0.0.255 10.0.0.0 0.0.0.255
    access-list 120 deny ip 192.168.2.0 0.0.0.255 192.168.25.0 0.255.255.255

    access-list 121 allow ip 10.0.0.0 0.255.255.255 192.168.2.0 0.0.0.255
    access-list 122 allow ip 192.168.25.0 0.0.0.255 192.168.2.0 0.0.0.255

    IP route 192.168.2.0 255.255.255.0 172.17.0.6

    CISCO router
    ------------
    IP route 192.168.2.0 255.255.255.0 172.21.100.1
    IP route 10.0.0.0 255.0.0.0 172.17.0.71
    IP route 192.168.25.0 255.255.255.0 172.17.0.71

    Router DLink
    ---------------
    IP route 10.0.0.0 255.0.0.0 172.21.100.2
    IP route 192.168.25.0 255.255.255.0 172.21.100.2

    Please let me know if you have any other questions

    Harish.

    be sure to note all the useful messages!

  • Single SQL query for the analysis of the date of customs declaration under the table of Stock codes

    Dear all,


    Please tell us a single SQL query for the below,

    We have a Table of Stock as shown below,

    STOCK_TABLE

     

    ITEM_CODE

    (item code)

    BAT_NO

    (lot no.)

    TXN_CODE

    (transaction code)

    DOC_NO

    (number)

    BOE_DT

    (date of the customs declaration)

    I1

    B1

    I1

    I2

    I3

    B70

    I4

    B80

    I5

    B90

    T102

    1234

    JULY 2, 2015

    I6

    B100

    We have to find the date of customs declaration (i.e. the date when the items have come under this particular table) for items that are not attached to any document (that is, who have TXN_CODE, DOC_NO and BOE_DT fields with a NULL value).

    For each item in the table of actions, which is not attached to any document, the customs declaration date is calculated as follows.

    1. If (code section, lot number) combination is present under HISTORY_TABLE, the date of customs declaration will receive the UPDT_DT, the transaction code (TXN_CODE) is an IN or transactions (which can be analyzed from the TRANSACTIONS table).

    2. If (code section, lot number) combination is NOT currently at the HISTORY_TABLE (or) the transaction code respective to item - batch number combination code is an operation then customs declaration date will be the date of the document (DOC_DT) that we receive from one of the 3 tables IN_TABLE_HEAD that contains the element of that particular lot.

  • If the case 1 and case 2 fails, our customs declaration date will be the last date of document (DOC_DT) that we receive from one of the 3 tables IN_TABLE_HEAD containing that particular item and the BAT_NO in expected results will be that corresponding to this document, as appropriate, to another NULL.

  • If the case 1 or case 2 is successful, the value of the last field (in the output expected, shown further below) BATCH_YN will be 'Y', because it fits the lot. Otherwise it will be 'n'.
  • HISTORY_TABLE

     

    ITEM_CODE

    BAT_NO

    TXN_CODE

    DOC_NO

    UPDT_DT

    I1

    B1

    T1

    1234

    JANUARY 3, 2015

    I1

    B20

    T20

    4567

    MARCH 3, 2015

    I1

    B30

    T30

    7890

    FEBRUARY 5, 2015

    I2

    B40

    T20

    1234

    JANUARY 1, 2015

    TRANSACTION

     

    TXN_CODE

    TXN_TYPE

    T1

    IN

    T20

    OFF

    T30

    ALL THE

    T50

    IN

    T80

    IN

    T90

    IN

    T60

    ALL THE

    T70

    ALL THE

    T40

    ALL THE

    IN_TABLE_HEAD_1

     

    H1_SYS_ID

    (primary key)

    TXN_CODE

    DOC_NO

    DOC_DATE

    H1ID1

    T1

    1234

    JANUARY 1, 2015

    H1ID2

    T70

    1234

    FEBRUARY 1, 2015

    IN_TABLE_ITEM_1

     

    I1_SYS_ID

    H1_SYS_ID

    (foreign key referencing H1_SYS_ID in IN_TABLE_HEAD_1)

    ITEM_CODE

    I1ID1

    H1ID1

    I1

    I1ID2

    H1ID1

    I100

    I1ID3

    H1ID2

    I3

    IN_TABLE_BATCH_1

     

    B1_SYS_ID

    TXN_CODE                DOC_NO

    (now in IN_TABLE_HEAD_1)

    BAT_NO

    B1ID1

    T1

    1234

    B1 / can be empty

    B1ID2

    T70

    1234

    B70

    IN_TABLE_HEAD_2

     

    H2_SYS_ID

    (primary key)

    TXN_CODE

    DOC_NO

    DOC_DATE

    H2ID1

    T30

    4567

    FEBRUARY 3, 2015

    H2ID2

    T60

    1234

    JANUARY 3, 2015

    IN_TABLE_ITEM_2

     

    I2_SYS_ID

    H2_SYS_ID

    (foreign key referencing H2_SYS_ID in IN_TABLE_HEAD_2)

    ITEM_CODE

    I2ID1

    H2ID1

    I1

    I2ID2

    H2ID1

    I200

    I2ID3

    H2ID2

    I2

    IN_TABLE_BATCH_2

     

    B2_SYS_ID

    I2_SYS_ID

    (foreign key referencing I2_SYS_ID in IN_TABLE_ITEM_2)

    BAT_NO

    B2ID1

    I2ID1

    B30 / null

    B2ID2

    I2ID2

    B90

    B2ID2

    I2ID3

    B60

    IN_TABLE_HEAD_3

     

    H3_SYS_ID

    (primary key)

    TXN_CODE

    DOC_NO

    DOC_DATE

    H3ID1

    T50

    1234

    JANUARY 2, 2015

    H3ID2

    T80

    1234

    JANUARY 3, 2015

    H3ID3

    T90

    1234

    JANUARY 4, 2015

    H3ID4

    T40

    1234

    AUGUST 5, 2015

    IN_TABLE_ITEM_3

     

    I3_SYS_ID

    H3_SYS_ID

    (foreign key referencing H3_SYS_ID in IN_TABLE_HEAD_3)

    ITEM_CODE

    BAT_NO

    I3ID1

    H31D1

    I2

    B50

    I3ID2

    H3ID2

    I4

    B40

    I3ID3

    H3ID3

    I4

    I3ID4

    H3ID4

    I6

    There is no IN_TABLE_BATCH_3

    Please find below the expected results.

    OUTPUT

     

    ITEM_CODE

    BAT_NO

    TXN_CODE

    DOC_NO

    BOE_DT

    BATCH_YN

    I1

    B1

    T1

    1234

    JANUARY 3, 2015

    THERE

    I1

    B30

    T30

    7890

    FEBRUARY 5, 2015

    N

    I2

    B60

    T60

    1234

    JANUARY 3, 2015

    N

    I3

    B70

    T70

    1234

    FEBRUARY 1, 2015

    THERE

    I4

    T90

    1234

    JANUARY 4, 2015

    N

    I6

    T40

    1234

    AUGUST 5, 2015

    N

    Controls database to create the tables above and insert the records.

    CREATE TABLE stock_table()item_code VARCHAR2()80),bat_no VARCHAR2()80),txn_code VARCHAR2()80),

    doc_no VARCHAR2 (80), boe_dt DATE );

    INSERT EN stock_table

       VALUES ('I1', 'B1', '', '', '');

    INSERT EN stock_table

       VALUES ('I1', '', '', '', '');

    INSERT IN stock_table

       VALUES ('I2', '', '', '', '');

    INSERT EN stock_table

       VALUES ('I3', 'B70', '', '', '');

    INSERT EN stock_table

       VALUES ('I4', 'B80', '', '', '');

    INSERT EN stock_table

       VALUES ('I5', 'B90', 'T102', '1234', '02-JUL-2015');

    INSERT EN stock_table

       VALUES ('I6', 'B100', '', '', '');

    SELECT *

    FROM stock_table




     

    CREATE TABLE history_table()item_code VARCHAR2()80),bat_no VARCHAR2()80),txn_code VARCHAR2()80),

    doc_no VARCHAR2 (80), updt_dt DATE );

    INSERT IN history_table

       VALUES ('I1', 'B1', 'T1', '1234', '03-JAN-2015');

    INSERT IN history_table

       VALUES ('I1', 'B20', 'T20', '4567', '03-MAR-2015');

    INSERT IN history_table

       VALUES ('I1', 'B30', 'T30', '7890', '05-FEB-2015');

    INSERT IN history_table

       VALUES ('I2', 'B40', 'T20', '1234', '01-JAN-2015');

    SELECT *

    FROM history_table




     

    CREATE TABLE transaction1()txn_code VARCHAR()80),txn_type VARCHAR()80));


    INSERT INTO transaction1

       VALUES ('T1', 'IN');


    INSERT INTO transaction1

       VALUES ('T20', 'OUT');

    INSERT INTO transaction1

       VALUES ('T30', 'ALL');

    INSERT INTO transaction1

       VALUES ('T40', 'ALL');

    INSERT INTO transaction1

       VALUES ('T50', 'IN');

    INSERT INTO transaction1

       VALUES ('T60', 'ALL');

    INSERT INTO transaction1

       VALUES ('T70', 'ALL');

    INSERT INTO transaction1

       VALUES ('T80', 'IN');

    INSERT INTO transaction1

       VALUES ('T90', 'IN');

    SELECT *

    FROM transaction1




     

    CREATE TABLE in_table_head_1()h1_sys_id VARCHAR2()80) PRIMARY KEY,txn_code VARCHAR2()80),

    doc_no VARCHAR2 (80), doc_dt DATE );

    CREATE TABLE in_table_head_2()h2_sys_id VARCHAR2()80) PRIMARY KEY,txn_code VARCHAR2()80),

    doc_no VARCHAR2 (80), doc_dt DATE );

    CREATE TABLE in_table_head_3()h3_sys_id VARCHAR2()80) PRIMARY KEY,txn_code VARCHAR2()80),

    doc_no VARCHAR2 (80), doc_dt DATE );

     

    INSERT IN in_table_head_1

       VALUES ('H1ID1', 'T1', '1234', '01-JAN-2015');

    INSERT IN in_table_head_1

       VALUES ('H1ID2', 'T70', '1234', '01-FEB-2015');

    INSERT IN in_table_head_2

       VALUES ('H2ID1', 'T30', '4567', '03-FEB-2015');

    INSERT IN in_table_head_2

       VALUES ('H2ID2', 'T60', '1234', '03-JAN-2015');

    INSERT IN in_table_head_3

       VALUES ('H3ID1', 'T50', '1234', '02-JAN-2015');

    INSERT IN in_table_head_3

       VALUES ('H3ID2', 'T80', '1234', '03-JAN-2015');

    INSERT IN in_table_head_3

       VALUES ('H3ID3', 'T90', '1234', '05-JAN-2015');

    INSERT IN in_table_head_3

       VALUES ('H3ID4', 'T40', '1234', '05-AUG-2015');




     

    CREATE TABLE in_table_item_1()i1_sys_id VARCHAR2()80) PRIMARY KEY,

    h1_sys_id VARCHAR2 (80) REFERENCES in_table_head_1()h1_sys_id),item_code VARCHAR2()80));

    CREATE TABLE in_table_item_2()i2_sys_id VARCHAR2()80) PRIMARY KEY,

    h2_sys_id VARCHAR2 (80) REFERENCES in_table_head_2()h2_sys_id),item_code VARCHAR2()80));

    CREATE TABLE in_table_item_3(i3_sys_id VARCHAR2(80) PRIMARY KEY,

    h3_sys_id VARCHAR2 (80) REFERENCES in_table_head_3()h3_sys_id),item_code VARCHAR2()80),

    bat_no VARCHAR2 (80));

     

    INSERT IN in_table_item_1

       VALUES ('I1ID1', 'H1ID1', 'I1');

    INSERT IN in_table_item_1

       VALUES ('I1ID2', 'H1ID1', 'I100');

    INSERT IN in_table_item_1

       VALUES ('I1ID3', 'H1ID2', 'I3');

    INSERT IN in_table_item_2

       VALUES ('I2ID1', 'H2ID1', 'I1');

    INSERT IN in_table_item_2

       VALUES ('I2ID2', 'H2ID1', 'I200');

    INSERT IN in_table_item_2

       VALUES ('I2ID3', 'H2ID2', 'I2');

    INSERT IN in_table_item_3

       VALUES ('I3ID1', 'H3ID1', 'I2','B50');

    INSERT IN in_table_item_3

       VALUES ('I3ID2', 'H3ID2', 'I4','B40');

    INSERT IN in_table_item_3

       VALUES ('I3ID3', 'H3ID3', 'I4','');

    INSERT IN in_table_item_3

       VALUES ('I3ID4', 'H3ID4', 'I6','');

    SELECT *

    FROM in_table_item_1

    SELECT *

    FROM in_table_item_2

    SELECT *

    FROM in_table_item_3




     

    CREATE TABLE in_table_batch_1()b1_sys_id VARCHAR2()80) PRIMARY KEY,

    txn_code VARCHAR2 (80), doc_no VARCHAR2 (80), bat_no VARCHAR2 (80));

    CREATE TABLE in_table_batch_2()b2_sys_id VARCHAR2()80) PRIMARY KEY,

    i2_sys_id VARCHAR2 (80) REFERENCES in_table_item_2()i2_sys_id),bat_no VARCHAR2()80));

     

    INSERT IN in_table_batch_1

       VALUES ('B1ID1', 'T1', '1234', 'B1');

    INSERT IN in_table_batch_1

       VALUES ('B1ID2', 'T70', '1234', 'B70');

    INSERT IN in_table_batch_2

       VALUES ('B2ID1', 'I2ID1', 'B30');

    INSERT IN in_table_batch_2

       VALUES ('B2ID2', 'I2ID2', 'B90');

    INSERT IN in_table_batch_2

       VALUES ('B2ID3', 'I2ID3', 'B60');

    Please advise a solution for the same.

    Thank you and best regards,

    Séverine Suresh

    very forced (question subfactoring used to allow easy testing/verification - could work with these test data only)

    with

    case_1 as

    (select s.item_code,

    s.bat_no,

    h.txn_code,

    h.doc_no,

    h.updt_dt boe_dt,

    cases where s.bat_no = h.bat_no then 'Y' else ' n end batch_yn.

    cases where h.txn_code is not null

    and h.doc_no is not null

    and h.updt_dt is not null

    then 'case 1' '.

    end refers_to

    from (select item_code, bat_no, txn_code, doc_no, boe_dt

    of w_stock_table

    where bat_no is null

    or txn_code is null

    or doc_no is null

    or boe_dt is null

    ) s

    left outer join

    w_history_table h

    On s.item_code = h.item_code

    and s.bat_no = h.bat_no

    and exists (select null

    of w_transaction1

    where txn_code = nvl (s.txn_code, h.txn_code)

    and txn_type in ('IN', 'ALL')

    )

    ),

    case_2 as

    (select s.item_code,

    NVL (s.bat_no, h.bat_no) bat_no.

    NVL (s.txn_code, h.txn_code) txn_code.

    NVL (s.doc_no, h.doc_no) doc_no.

    NVL (s.boe_dt, h.updt_dt) updt_dt.

    cases where s.bat_no = h.bat_no then 'Y' else ' n end batch_yn.

    cases where h.txn_code is not null

    and h.doc_no is not null

    and h.updt_dt is not null

    then 'case 2'.

    end refers_to

    from (select item_code, bat_no, txn_code, doc_no, boe_dt

    of case_1

    where refers_to is null

    ) s

    left outer join

    w_history_table h

    On s.item_code = h.item_code

    and exists (select null

    of w_transaction1

    where txn_code = nvl (s.txn_code, h.txn_code)

    and txn_type in ('IN', 'ALL')

    )

    and not exists (select null

    of case_1

    where item_code = h.item_code

    and bat_no = h.bat_no

    and txn_code = h.txn_code

    and doc_no = h.doc_no

    and updt_dt = h.updt_dt

    )

    ),

    case_31 as

    (select s1.item_code,

    NVL (S1.bat_no, W1.bat_no) bat_no.

    NVL (S1.txn_code, W1.txn_code) txn_code.

    NVL (S1.doc_no, W1.doc_no) doc_no.

    NVL (S1.updt_dt, W1.doc_dt) updt_dt.

    cases where s1.bat_no = w1.bat_no then 'Y' else ' n end batch_yn.

    cases where w1.txn_code is not null

    and w1.doc_no is not null

    and w1.doc_dt is not null

    then "case 31'.

    end refers_to

    from (select item_code, bat_no, txn_code, doc_no, updt_dt, batch_yn, refers_to

    of case_2

    where refers_to is null

    ) s1

    left outer join

    (select i1.item_code, h1.txn_code, h1.doc_no, h1.doc_dt, b1.bat_no

    of w_in_table_item_1 i1

    inner join

    w_in_table_head_1 h1

    On i1.h1_sys_id = h1.h1_sys_id

    inner join

    w_in_table_batch_1 b1

    On h1.txn_code = b1.txn_code

    and h1.doc_no = b1.doc_no

    ) w1

    On s1.item_code = w1.item_code

    ),

    case_32 as

    (select s2.item_code,

    NVL (S2.bat_no, W2.bat_no) bat_no.

    NVL (S2.txn_code, W2.txn_code) txn_code.

    NVL (S2.doc_no, W2.doc_no) doc_no.

    NVL (S2.updt_dt, W2.doc_dt) updt_dt.

    cases where s2.bat_no = w2.bat_no then 'Y' else ' n end batch_yn.

    cases where w2.txn_code is not null

    and w2.doc_no is not null

    and w2.doc_dt is not null

    then "case 32'.

    end refers_to

    from (select item_code, bat_no, txn_code, doc_no, updt_dt, batch_yn, refers_to

    of case_2

    where refers_to is null

    ) s2

    left outer join

    (select i2.item_code, h2.txn_code, h2.doc_no, h2.doc_dt, b2.bat_no

    of w_in_table_item_2 i2

    inner join

    w_in_table_head_2 h2

    On i2.h2_sys_id = h2.h2_sys_id

    inner join

    w_in_table_batch_2 b2

    On i2.i2_sys_id = b2.i2_sys_id

    ) w2

    On s2.item_code = w2.item_code

    ),

    case_33 as

    (select s3.item_code,

    w3.bat_no,

    NVL (S3.txn_code, w3.txn_code) txn_code.

    NVL (S3.doc_no, w3.doc_no) doc_no.

    NVL (S3.updt_dt, w3.doc_dt) updt_dt.

    cases where s3.bat_no = w3.bat_no then 'Y' else ' n end batch_yn.

    cases where w3.txn_code is not null

    and w3.doc_no is not null

    and w3.doc_dt is not null

    then "case 33'.

    end refers_to

    from (select item_code, bat_no, txn_code, doc_no, updt_dt, batch_yn, refers_to

    of case_2

    where refers_to is null

    ) s3

    left outer join

    (select i3.item_code, h3.txn_code, h3.doc_no, h3.doc_dt, i3.bat_no

    of w_in_table_item_3 i3

    inner join

    w_in_table_head_3 h3

    On i3.h3_sys_id = h3.h3_sys_id

    ) w3

    On s3.item_code = w3.item_code

    )

    Select item_code, bat_no, txn_code, doc_no, boe_dt, batch_yn

    of case_1

    where refers_to is not null

    Union of all the

    Select item_code, bat_no, txn_code, doc_no, updt_dt, batch_yn

    of case_2

    where refers_to is not null

    Union of all the

    Select item_code, bat_no, txn_code, doc_no, updt_dt, batch_yn

    from (select item_code, bat_no, txn_code, doc_no, updt_dt, batch_yn,

    ROW_NUMBER() over (partition by item_code of updt_dt desc order) rn

    from (select item_code, bat_no, txn_code, doc_no, updt_dt, batch_yn

    of case_31

    where refers_to is not null

    Union of all the

    Select item_code, bat_no, txn_code, doc_no, updt_dt, batch_yn

    of case_32

    where refers_to is not null

    Union of all the

    Select item_code, bat_no, txn_code, doc_no, updt_dt, batch_yn

    of case_33

    where refers_to is not null

    )

    )

    where rn = 1

    ITEM_CODE BAT_NO TXN_CODE DOC_NO BOE_DT BATCH_YN
    I1 B1 T1 1234 JANUARY 3, 2015 THERE
    I1 B30 T30 7890 FEBRUARY 5, 2015 N
    I2 B60 T60 1234 JANUARY 3, 2015 N
    I3 B70 T70 1234 FEBRUARY 1, 2015 THERE
    I4 - T90 1234 JANUARY 5, 2015 N
    I6 - T40 1234 AUGUST 5, 2015 N

    Concerning

    Etbin

  • HOWTO server logs for vm config

    I need to check and maintain logs for all virtual machines which vCenter Server provides (judgment of the vm, vmotion, network errors migration,...) and so I ask if it is possible to configure to send logs to an external syslog server. Is there a document on this subject?

    Find the event detailed component are recorded in the journals of vcenter. Yes they contain this info.

    VMware KB: Location of the vCenter server log files

  • Sun DS version 5.2 disable users have not logged for 6 months

    Hello

    I use Sun DS version 5.2.
    I want to disable users who are not logged for 6 months.

    How can I do?

    BTW, please note that the Sun DS 5.2 version and therefore there is no attribute to track the last connection of the users.


    Thank you.

    Hello
    unless you know that the login of the user changes another attribute in its profile, so this can change the modifytimestamp, then there is no other way to obtain this information by querying the DS instance.
    In this case, I think that an alternative "dirt" would be to 'interpret' the log files... search the dregs :(

    HTH,
    Marco

  • Activate the transaction log for isqlplus sessions?

    Hello

    How to enable the transaction log for isqlplus sessions.

    IM using oracle 9i. I want to know what are all the sql statements executed through plu isql.

    Good help will be appreiciated.

    Concerning
    SankarMN

    SankarMCA wrote:
    Hello

    How to enable the transaction log for isqlplus sessions.

    IM using oracle 9i. I want to know what are all the sql statements executed through plu isql.

    Good help will be appreiciated.

    Concerning
    SankarMN

    You can enable auditing or go with LOGON trigger. LOGON trigger must check if the session is from isqlplus. If so, then enable tracing for this session.

  • HP: unlock OEM windows 7 for use with another computer?

    Hello

    I recently got a HP computer with an OEM windows installation 7. After the machine (fatal hardware failure), I tried to use the windows key to install it on another computer. However, the key is an OEM product and would not activate, so after talking to microsoft they sent me here to ask if the manufacturer could "unlock" the key for use with another computer (that I build from scratch).

    So all this possible? Or do I have to buy a new license?

    Okay, Ive talked to HP and microsoft and it turns out that the key has been blocked (pirates). So much for the purchase of second hand.

  • Password for access TL96 on network

    Hi, when I browse my TV on my LAN IP address I'm invited for a user name and password. What are the default settings?

    Thank you

    Hello

    If this username and default password is required, you should be able to find it in the user manual.
    But I m wondering why go you to the TV during the INVESTIGATION period?

    You can connect the TV to the home network and the support of menu TV Toshiba some options for access to the network. In Media Player, you can find the USB media player and the Player multimedia network. To access the video and picutres you must use the 2nd option (network drive)

  • I have IE8 Favorites saved off as bookmark.htm in another network location. How can I get in firefox?

    I have IE8 Favorites saved off as bookmark.htm in another network location. How can I get in firefox?

    Bookmarks > organize bookmarks-> import and backup - import HTML... = HTML file

  • Can I buy a second Apple TV and use my existing account even information on it for use on another TV in the home? These Apple TV count as one of the "peripheral" in the application itunes/environment?

    Can I buy a second Apple TV and use my existing account even information on it for use on another TV in the home? These Apple TV count as one of the "peripheral" in the application itunes/environment?

    Yes, you can. As far as I know, you are allowed 10 devices (including iPads, iPad and Apple TV), of which 5 can be computers.

  • ODBC SQL Server for Solaris 64-bit drivers

    Does anyone know if there is a driver available for ODBC SQL Server for Solaris 64 bit server?

    Thank you

    CB

    [edit: moved to SQL Server questions]

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

Maybe you are looking for