AUDIT only creates a record if the privilege is granted

Hello world. I try to configure auditing for security requirements and did some tests on a test database. (10.2.0.5 on RHEL 6) with the statement of VERIFICATION BY CREATING the ACCESS USERS.

Just did some quick tests, I found that VERIFICATION will only create a folder if I have the privilege to CREATE a USER. For example, here's my test case and the result:

1. without privilege

-CHECK CREATE USER BY ACCESS

-Scott doesn't have the privilege to create users

-Try to create the user, without success.

-No record is generated in the audit log.

2. with privilege

-CHECK CREATE USER BY ACCESS

-Scott got the privilege to create users

-Try to create users, success

-Record is generated in the audit log

-Try to remove the user, without success

-No record is generated in the audit log.

I guess it comes to the design provided by Oracle, but this is not a little limited with respect to the audit of the attempts of creating a user? For example, if a user can access the database and kept the attempt to add users or perform other commands to test the limits of its privileges, which doesn't record? Just my 2 cents.

CHECKING DBA;

will begin recording failures.

Before checking dba:

Select username, extended_timestamp, action_name returncode from dba_audit_trail where username = 'AAA ';

USERNAME EXTENDED_TIMESTAMP ACTION_NAME RETURNCODE

------------------------------ --------------------------------------------------------------------------- ---------------------------- ----------

AAA 10.34.49.648357 25-SEP-14 H + 03:00 OPENING OF SESSION 0
AAA 10.53.58.118870 25-SEP-14 H + 03:00 OPENING OF SESSION 0
AAA 10.55.25.684156 25-SEP-14 H + 03:00 OPENING OF SESSION 0
AAA 11.07.13.836793 25-SEP-14 H + 03:00 OPENING OF SESSION 0
AAA 10.35.08.209502 25-SEP-14 H + 03:00 CLOSURE OF SESSION 0
AAA 10.54.18.688233 25-SEP-14 H + 03:00 CLOSURE OF SESSION 0
AAA 10.55.44.786759 25-SEP-14 H + 03:00 CLOSURE OF SESSION 0
AAA 11.07.23.881964 25-SEP-14 H + 03:00 CLOSURE OF SESSION 0

After checking dba:

Select username, extended_timestamp, action_name returncode from dba_audit_trail where username = 'AAA ';

USERNAME EXTENDED_TIMESTAMP ACTION_NAME RETURNCODE

------------------------------ --------------------------------------------------------------------------- ---------------------------- ----------

AAA 11.07.18.790623 25-SEP-14 H + 03:00 CREATING USER 1031
AAA 10.34.49.648357 25-SEP-14 H + 03:00 OPENING OF SESSION 0
AAA 10.53.58.118870 25-SEP-14 H + 03:00 OPENING OF SESSION 0
AAA 10.55.25.684156 25-SEP-14 H + 03:00 OPENING OF SESSION 0
AAA 11.07.13.836793 25-SEP-14 H + 03:00 OPENING OF SESSION 0
AAA 10.35.08.209502 25-SEP-14 H + 03:00 CLOSURE OF SESSION 0
AAA 10.54.18.688233 25-SEP-14 H + 03:00 CLOSURE OF SESSION 0
AAA 10.55.44.786759 25-SEP-14 H + 03:00 CLOSURE OF SESSION 0
AAA 11.07.23.881964 25-SEP-14 H + 03:00 CLOSURE OF SESSION 0

Tags: Database

Similar Questions

  • exp/imp only a few records in the table

    Hello
    Exp/imp few records in my table during the activity level exp/imp table is possible?
    If so, what setting should I be using
    For example,.
    I have 10000 records in my narration of the table "TEST_TB".
    I have the dump full exp for the table.
    But I want to just imp only 50000 records from the same table in another schema.
    How would it be possible?
    Please suggest me on this

    Kind regards
    Faiz

    Hello

    It seems not possible to limit the number of rows that is imported, but it is possible to limit the number of rows exported with the query parameter, found examples
    http://www.orafaq.com/wiki/Import_Export_FAQ
    http://docs.Oracle.com/CD/B28359_01/server.111/b28319/exp_imp.htm#autoId52

    HtH
    Johan

  • Error when creating new record in the jspx page.

    Hello! I have error when you try to post the new record in the jspx page (see: http://my.jetscreenshot.com/2677/20100820-oo8z-19kb)

    DB I trigger and in the EO primary key attribute I Type set to DBSequence.

    Where is the problem and what to do?

    Best regards, Debuger

    @Sireesha excellent point!

    @Debugger the reason why you get the error, it is you're missing an af:convertNumber, however, as said Jean Lou, why even put a DBSequence field on your screen?

    John

  • Emails from storage for the POP3 account folders 2012 WLM to Outlook 2013 POP3 only creates empty folders in the wrong email account

    NOTE: We have already been asked to come on this forum by Office 365/Outlook 2013 support, so don't tell people not that go back us!

    1. we are under W7 64-bit SP1, run WLM 2012 32-bit and 32-bit Outlook 2013 both installed on this system.

    2. we have a POP3 account set as DEFAULT account in WLM 2012 with old messages in different folders to storage.

    3. we have a POP3 account, which is defined as the DEFAULT account in Outlook 2013.  (But we also have an outlook.com account.)

    4. we try to migrate messages in the WLM 2012 storage folder named 'A book' in Outlook 2013.

    5. we followed the instructions in various other forums support and information pages of Microsoft as follows...

    6. with WLM 2012 and 2013 Outlook both running in WLM 2012 we:

    a. Select "File" (really just a down-arrow in the upper left corner)

    b. select «Export emails»

    c. then select "E-mail."

    d. Select "Microsoft Exchange", and then say 'OK' in the popup window that says that this move Outlook email, etc.

    e. then we click on option button "selected files".

    f. then we click on 'A book', which is a subfolder or storage of our WLM 2012 POP3 account folders.

    g so we say 'OK' and 'Finish '.

    7. for our tests, there are only 3 message in 'A record '.  After we get the message that the export was finished, there is no error message, so he seems to think that everything worked OK.

    8. However, the net result is that a folder named "Folder A" has been created in our outlook.com account (incorrect account; the account POP3 and NOT the default account) AND the folder is empty, containing no message at all.

    We also tried a different folder in WLM 2012 which has been directly added to the POP3 account, instead of lying in "Storage folders" of WLM, but the result was the same.

    There are thousands of e-mails concerned here.  We NEED to somehow get this export/import of working for us before we can migrate Office 365 WLM 2012 / 2013 Outlook.

    Remove the outlook.com e-mail account, and then confirm that MS Outlook works correctly with his pop e-mail account.

    Then in WLM run the export again process.

    Exported messages should appear in the MS Outlook Inbox

  • Create dummy records using the model cluase with date field condition

    Hi all

    I have two tables below:

    create the table Interest_date

    (

    date of interest_date_field,

    Number of Interest_amount

    );

    create the table sys_date

    (type varchar2 (30),)

    date_value date

    );

    Insert all

    IN Interest_date values (to_date('01-11-2012','DD-MM-YYYY'), 20)

    IN Interest_date values (to_date('01-12-2012','DD-MM-YYYY'), 40)

    IN Interest_date values (to_date('02-01-2013','DD-MM-YYYY'), 60)

    IN Interest_date values (to_date('01-06-2013','DD-MM-YYYY'), 80)

    IN Interest_date values (to_date('01-07-2014','DD-MM-YYYY'), 10)

    IN Interest_date values (to_date('25-11-2014','DD-MM-YYYY'), 20)

    INTO SYS_DATE VALUES ('FIRST_DATE',TO_DATE('01-06-1900','DD-MM-YYYY'))--note: the year is not important but the date is used for other

    INTO SYS_DATE VALUES ('FIRST_DATE',TO_DATE('01-12-1900','DD-MM-YYYY'))--note: the year is not important but the date is used for other

    Select * twice;

    Requirement:

    I need to write a select statement that retrieves all the records in interest_date and add a dummy record according to what follows:

    -in NO case of JJ - MM interest_date_field for a given year (year group) = DD - MM of the date_value in sys_date where the type is "FIRST date"-> add a dummy record (date_value for type FIRST_DATE yyyy = year of interest_date_field, - 1)

    -in NO case of JJ - MM interest_date_field for a given year (group by year) = DD - MM of the date_value in sys_date where the type is 'SECOND DAY'-> add a dummy record (date_value for type SEOND_DATE yyyy = year of interest_date_field, - 1)

    Desired output:

    Interest_date_field Interest_amount

    06/01/2012-1

    11/01/2012 20

    12/01/2012 40

    01/02/2013 60

    06/01/2013 80

    12/01/2013-1

    06/01/2014-1

    07/01/2014 10

    25/11/2014 20

    01/12/2014-1

    Thank you very much

    Ferro

    Why not combine the first with the second approach:

    with the years as)

    Select distinct

    TO_CHAR (interest_date_field, "YYYY") y

    of Interest_date

    )

    year_dates as)

    Select

    to_date(y||) MD, 'YYYYMMDD') d

    years

    (to_char(date_value,'MMDD') md by selecting in SYS_DATE)

    )

    Select

    I have interest_date

    an interest_amount

    of interest_date

    model

    dimension (interest_date_field i)

    measures (Interest_amount a)

    rules)

    a [for i (select year_dates d)] = nvl (a [cv ()],-1)

    )

    i order

  • create new record in the table of the tree

    REFERRED to the ADF Code 83 corner. How-to - create the two-way synchronization between a tree and a form input element

    http://www.Oracle.com/technetwork/developer-tools/ADF/learnmore/83-bidi-synchronization-tree-form-401841.PDF

    Mr.Frank usese (deptId) of allDepartmentsWithEmployeesIterator-> > > iterator

    to insert the new employee in the service selected tree node

    it get the departmentId for the current line of allDepartmentsWithEmployeesIterator

    and set it as the new employee to the new departmentId inserted in the allEmployeesIterator

    This multiy in table tree we have the employees table and departments table

    ------------------------------------

    public String onCreateEmployee() {}
    BindingContainer links = getBindings();
    OperationBinding operationBinding =
    bindings.getOperationBinding ("Create1");
    Object result = operationBinding.execute ();
    If (! operationBinding.getErrors () .isEmpty ()) {}
    TODO add the error handling
    Returns a null value.
    }

    a department Id the value of the tree node's parent
    DCIteratorBinding = departmentIter
    (DCIteratorBinding) bindings.get ("allDepartmentsWithEmployeesIterator");
    Line currentDepartmentRow = departmentIter.getCurrentRow ();
    Object deptId = currentDepartmentRow.getAttribute ("DepartmentId");
    DCIteratorBinding = employeesIter
    (DCIteratorBinding) bindings.get ("allEmployeesIterator");
    Line currentEmployeeRow = employeesIter.getCurrentRow ();
    currentEmployeeRow.setAttribute ("DepartmentId", deptId);

    Returns a null value.
    }

    -----------------------------------

    I'm doing the same functionalty

    in the same tree table

    Insert the child registered under the selected parent node

    but it gives me the ID of the employee of topRank

    in which case we use tree one View object

    as long as same as in ADF code corner article

    032. creating a table tree of a single object View and access selected lines

    We thus obtain the topRanked EmployeeID Steven King is 100

    not the employeeId correct if you select low-tier employee

    ------------------------------

    Create Itried to use with the parameter

    He gave me the same result always it create used under top class used 100 steven King

    not covered by the selected Manager

    -----------------------------------------

    in a few words I'm looking for a way to insert a new line under the selected node

    in the case of the component tree is based on the same view object

    is it an idea or a help on this

    Hello

    in your case, the employee Id is what you need to get the tree component itself. In my article, I rely on the synchronization between two iterators, which in your case is not possible. If access you the component of the tree to get the current selected node. This should be an instance of JUCtrlHierNodeBinding that you can call getRow to obtain the selected user. You can query a second View object to show the employee to edit (the current together by key line). Even when you create a new employee. Access you the second VO iterator used after you call Create to create a new line. On the iterator, you call iterator.setAttribute (attribute_name, value_read_from_parent)

    Frank

  • Create new records from the other periodicies month

    Hi guys,.

    I have a table in which we store our customers billing data. It s a subscription service so we charge the customer periodically, some customers are billed monthly, a few times a year, some 3, and some only once. We consider these customers who paid their last active bill, so I would like to know how much each month from customers is active. So lets say we have a table like this:

    Customer_Id Result Date Billing preferences
    1Successful01/01/2013Monthly
    1Failed02/01/2013Monthly
    1Successful03/01/2013Monthly
    1Successful04/01/2013Monthly
    1Failed05/01/2013Monthly
    1Successful06/01/2013Monthly
    2Successful01/01/2013Semestrly
    2Failed06/01/2013Semesterly

    *

    I want to get a table like this:

    Customer_Id State Date
    1Assets01/01/2013
    1Not active02/01/2013
    1Assets03/01/2013
    1Assets04/01/2013
    1Not active05/01/2013
    1Assets06/01/2013
    2Assets01/01/2013
    2Assets02/01/2013
    2Assets03/01/2013
    2Assets04/01/2013
    2Assets05/01/2013
    2Not active06/01/2013

    Do you know a trick to get this?

    Thank you very much

    *

    as billing

    (

    Select "1" as Custumer_id, "Successful" as a result, 1 January 2013 "as date_,"Monthly"as the double Billing_Preference

    Union

    Select '1' Custumer_id, "Failed" as a result, 2 January 2013 ' as date_, "Monthly" as the double Billing_Preference

    Union

    Select "1" as Custumer_id, "Successful" as a result, 3 January 2013 ' as date_, "Monthly" as the double Billing_Preference

    Union

    Select "1" as Custumer_id, "Successful" as a result, 4 January 2013 ' as date_, "Monthly" as the double Billing_Preference

    Union

    Select '1' Custumer_id, "Failed" as a result, 5 January 2013 ' as date_, "Monthly" as the double Billing_Preference

    Union

    Select "1" as Custumer_id, "Successful" as a result, 6 January 2013 ' as date_, "Monthly" as the double Billing_Preference

    Union

    Select "2" as Custumer_id, "Successful" as a result, on January 1, 2013 "as date_,"Semesterly"as the double Billing_Preference

    Union

    Select "2" as Custumer_id, 'impossible' as a result, 6 January 2013 ' as date_, "Semesterly" as the double Billing_Preference

    )

    Select * billing

    order by ASC, ASC 3 1

    Hello

    My mistake.  Just change 1 line of code, like this:

    WITH got_date_billed AS

    (

    SELECT custumer_id

    result

    , TO_DATE (date_, ' DD/MM/YYYY') AS date_billed

    BILLING

    -WHERE... - If you need any filtering, put it here

    )

    got_months_needed AS

    (

    SELECT custumer_id, result, date_billed

    MONTHS_BETWEEN (in ADVANCE (date_billed) OVER (PARTITION BY custumer_id,

    ORDER BY date_billed

    )

    date_billed

    ) AS month_gap

    OF got_date_billed

    )

    SELECT custumer_id

    result AS State

    , ADD_MONTHS (date_billed, LEVEL - 1) AS date_-* CHANGED *.

    OF got_months_needed

    CONNECT BY custumer_id = PRIOR custumer_id

    AND date_billed = PRIOR date_billed

    AND LEVEL<=>

    AND PRIOR (SYS_GUID ()) IS NOT NULL

    ;

  • Create records of the range

    Hello world:

    I'm trying to create new records at the base on the range of numbers available. For example, the following numbers are available:
    100
    101
    102
    103
    109
    110
    111
    202

    A selection list to submit, if I select '100' to the starting number, I want my ending number selection list to show only the following numbers: 101, 102 and 103. I don't want to give users that they expect to create 100-202 records (if they choose for the ending number 202) hopes. Currently, if the user selects 100 for the starting number and 202 to the end, 8 files will be created by giving this example.

    Any help will be greatly appreciated!

    Bino-

    Hi Bino,

    Try this:

    select * from
       (
          select v, lag(v,1) over (order by v) p
          from t
          where v >= 
       )
      where v  = p + 1
       and v <
       (select min(v0) from
         ( select
              case
               when (v - lag(v,1) over (order by v)) > 1 then v
               else 0
              end v0
            from t
              where  v > 
         ) tt where  v0 > 1
       )
    

    I don't think that he could be executed effectively, but it should work

    Kind regards
    Lev

  • Audit selective create session

    Is there a way to do the audit of fine particle size more to "create session".

    I want to audit only create session for a select list of users when they connect to specific machines.

    For example, our web server has a specific user, in that it connects to oracle. I would like to audit create session for the user when he is not from the web server.

    My current solution is to audit create session for these users, and then having a job that cleans the records, I don't want.

    Using sqlnet.ora you can specify allowed and denied IP addresses. So, in theory, you could only allow the IP address of the web server. This would prevent developers to connect from their seats, depending on the configuration of the network.

    Another option would be to use the ROLES of APPLICATION SECURITY. In the secure application roles, the role is not enabled unless that some conditions, such as defined by you, are met. Therefore, you can set a condition that says that the client must have a specific IP address. If they have it activated the role, otherwise, the role is disabled.

    HTH!

    Published by: Centinul on February 19, 2009 14:21

    I wanted to also add in the secure application role, you can check the program customer, and in your case, it may be something like php - cgi *. You can only allow the role to be activated when a PHP program is run on the web server. However, this is not a complete solution because theoretically the user could write their own client and set the program setting must match that of the PHP program. However, depending on your other configurations, this can be a minimal risk that can be accepted.

  • Mapping the privileges predefined to those indicated in the GUI-&gt; Administration-&gt; roles-&gt; privileges


    Hello

    This time, I have a question about the GUI Web Client itself.  I've been working on looking for predefined privileges before offering a feature in our plugin.

    I am able to know if the privilege is granted for an object in my data provider.

    Now, I'm ready to test, so I have:

    -created a new user in the WebClient service

    -created a role that will be assigned to this user of an object (host)

    Now, I want to assign privileges to the role, but has problems to understand GUI.

    I go to Administration-> roles

    -create a new role

    -Click on the tab 'privileges '.

    Here, I see a tree containing all the privileges that can be assigned to the role, but I'm not able to map these 1 x 1 to

    the ones I'm looking for.  An example is

    'Host.Config.Settings' that is needed to perform the UpdateIPMI() operation for a host.

    For example, in the tree, I opened

    v home

    v Configuration

    I expected to see 'Settings', but only

    -Advanced settings

    -Change the settings

    So my question is, how do I know which of these to be defined (without error). Is there a documentation which maps the privileges in the GUI to

    the 'real' like 'Host.Config.Settings '?  The link help for the link to the Documentation isn't really help here.

    These are the privileges for which I find no parameters (at least, it's not intuitive)

    Host.Config.Autostart

    Host.Config.Settings

    Host.Config.NetService

    Thanks for the Info.

    Cathy

    Hi Cathy,.

    Here's what you'll need:

    Host.Config.AutoStart = startup configuration automatic virtual machine

    Host.Config.Settings = change the settings

    Host.Config.NetService = security profile and firewall

    Concerning

    Kaloyan

  • Validate values inserted into a table against an another record in the table.

    Hi, I have this two tables on my Oracle Database 10g:
            Status                                    
    
    Id_Status | Description        
    --------------------------------       
      102     |   Ok                 
      123     |   Damaged 
      345     |   Broken
    
    Cars
    
    Car_ID|  wheel  |  hood  |  bumper  |  radiator
    -------------------------------------------------
      1   |   1     |     2  |     2    |   3
    and what I have to do is to make sure that you can only insert a record if the [wheel, hood, bumper, radiator etc...] values are values that already exist in the State of the table, but I do not know if you add FK as:
    ALTER TABLE "RCVRY"."COMPANY" 
        ADD (CONSTRAINT "CITY_ID" FOREIGN KEY("STATE") 
        REFERENCES "RCVRY"."CITIES"("STATE")
    is the right way to do it.

    If anyone can help by providing code samples or pointing to the right place in the documentation to look out it will be greatly appreciated.
    Concerning

    JMHP

    Hello

    José M. Hurtado says:
    Hi, I have this two tables on my Oracle Database 10g:

    Status                                    
    
    Id_Status | Description
    --------------------------------
    102     |   Ok
    123     |   Damaged
    345     |   Broken
    
    Cars
    
    Car_ID|  wheel  |  hood  |  bumper  |  radiator
    -------------------------------------------------
    1   |   1     |     2  |     2    |   3
    

    and what I have to do is to make sure that you can only insert a record if the [wheel, hood, bumper, radiator etc...] values are values that already exist in the State of the table, but I do not know if you add FK as:

    ALTER TABLE "RCVRY"."COMPANY"
    ADD (CONSTRAINT "CITY_ID" FOREIGN KEY("STATE")
    REFERENCES "RCVRY"."CITIES"("STATE")
    

    is the right way to do it.

    Yes, foreign keys are the right way to do it.
    Make sure that first of all, there is a constraint of PRIMARY KEY (or UNIQUE) on status.id_status.

    If anyone can help by providing code samples or pointing to the right place in the documentation to look out it will be greatly appreciated.

    The code you have posted has an imbalance ' (' between ADD and CONSTRAINT.) Lose that ' (' and you have the right syntax.)
    Double quotes are necessary only if you use non-standard names. Do not.
    The schema name (RCVRY in the above example) is optional.

    So, you could say:

    ALTER TABLE     cars
    ADD CONSTRAINT     cars_wheel_fk
    FOREIGN KEY     (wheel)
    REFERENCES     status (id_status)
    ;
    

    I hope that answers your question.
    If this is not the case, after a test script.
    Publish instructions CREATE TABLE for tables and ALTER TABLE instructions for constraints (if they are not part of the CREATE TABLE statements).
    Let's just do the constraint on wheel first. Once you know how to do this, add similar constraints for the other columns (radiator, hood, bumper,) will be easy.
    After a series of INSERT statements (and update, if you want) for the two tables, which must be executed in order.
    Say if you want as each INSERT (or UPDATE) statement of work or not. (Include a few of them).

    Published by: Frank Kulash, December 7, 2010 19:15

  • Create multiple records instead of single record.

    Form of Oracle 10g

    Hi all

    Enjoy id someone help me, I have a form and when I insert data in that form it will create a record in the database table, now my requirement that it will create 3 records in the same table, can someone tell me the logic to create 3 files instead of one.

    I intend to create a database triggers but do not know who is a valid choice of not.  Thank you

    Concerning

    Matt


    Hello

    If you want to do your job the way you want I suggest the creation of a joint table between

    trans_amt

    trans_type

    called trans_amt_type , why do we not have to think about that... ?

    Since it is a bad db design. It is supposed to rely on different types of Trans Table as a look up table where you can set different than necessary trans at all times.

    Now, let's start on the VALIDATION KEY or insertion after Trigger (how economy and then duplicate record is as follows:)

    You can use the following logic:

    INSERT INTO table1 (column1..), SELECT col1... FROM table2 WHERE vc_amt > 0 and rs_amt_no _no = 0 and ct_amt_no = 0;

    And as for the conditions of rest...

    or

    INSERT INTO trans_amt_type (col1, col2,vc_amt_no, trans_type,col4, ...)
    values (select col1, col2 from

    (select col1, col2,:vc_amt_no,'V', col4 rn rownum

    from trans_amt where --relation FK & PK---) ;

    Amatu Allah.

  • How can I determine what were the privileges granted to the PUBLIC?

    I don't know 'out of the box' privileges by default Oracle, but rather the privileges that have been granted since the day 0.

    SQL > select * from dba_sys_privs where dealer = "PUBLIC";

    no selected line

    SQL > grant create any table to the public;

    Grant succeeded.

    SQL > select * from dba_sys_privs where dealer = "PUBLIC";

    DEALER PRIVILEGE SMA

    ------------------------------ ---------------------------------------- ---

    PUBLIC CREATE ANY TABLE NO.

    SQL > revoke create any table of public;

    Revoke succeeded.

    SQL > select * from dba_sys_privs where dealer = "PUBLIC";

    no selected line

    SQL >

    The PUBLIC role is a special role that each database user account is automatically when the account is created. By default, it has no privileges granted to it, but there are many grants, especially for Java objects.


    The same binding, which was provided by a member.


    DBA_ROLE_PRIVS - roles granted to users and roles

    ROLE_ROLE_PRIVS - roles that were granted to roles

    ROLE_SYS_PRIVS - privileges granted to the roles system

    ROLE_TAB_PRIVS - Table privileges granted to roles

    Concerning

    Girish Sharma

  • Help with the query to select only one record from the result set in double

    Hello

    Please help with the query. Version of Oracle database we use is 10g R2.

    I have a vision that is duplicated IDS, but they are used across the different functions. See below examples of data. Please help me with a query to select only one record (based on ID regardless of the area) from the bottom of the result set of duplicate records. For what is the point of view is there unique records, given the combination of the fields ID, Org, DF, dry, Sub-Sec

    ID
    Org
    DF
    Sec Sub-Sec

    (163)CQCPDMCPDMHD(163)PCENGENGENG(163)CQASICASICIS8888TSTACTACTAC(163)TSHEHESW6789CQINFOINFOFOS6789PCSECSYSSECSYSINFO16789TSSECSYSSECSYSINFO29009PCBMSBMSBMS1

    My result set must eliminate the duplicate identifiers regardless of whoever we choose of the result set. (I mean without distinction Org, DF, s, Sub-s). My expected result set should be.

    ID
    DSB

    DF
    SEC
    Sub-Sec
    (163)CQCPDMCPDMHD8888TSTACTACTAC6789CQINFOINFOFOS9009PCBMSBMSBMS1


    Thank you

    Orton

    Hello

    This sounds like a job for ROW_NUMBER:

    WITH got_r_num AS

    (

    SELECT id, DSB, df, s, sub_sec org

    ROW_NUMBER () OVER (PARTITION BY ID.

    ORDER BY org

    ) AS r_num

    OF view_x

    )

    SELECT id, DSB, df, sub_sec s,

    OF got_r_num

    WHERE r_num = 1

    ;

    He is a Top - N query example, where you choose the elements of N (N = 1 in this case) from the top of an ordered list.

    I hope that answers your question.
    If not, post a small example of data (CREATE TABLE and INSERT, only relevant columns instructions) to your sample data and the results desired from these data.  (I know that you said that you were a view selection.  Just for this thread, pretending it is a picture and post simple CREATE TABLE and INSERT statements to simulate your point of view).
    Point where the above query is to produce erroneous results, and explain, using specific examples, how you get the right results from data provided in these places.  (I didn't quite understand the explanation above.  I don't know why you want to

    ID ORG DF DRY SUB_SEC

    --      ---     --      ---     -------

    1234 CQ DPRK DPRK HD

    and is not

    1234 IS CQ ASIC, ASIC

    or

    TS 1234 IT IT SW

    or

    1234 CQ ASIC ASIC HD

    )
    If you change the query at all, post your modified version.
    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: https://forums.oracle.com/message/9362002

  • Detailed form Master in Apex - creating main records and details at the same time

    I m trying to create a master form / retail.
    The master is a simple standard form and below on the same page there is a tabular presentation containing the details.

    I am facing a problem when you try to save a new record from the master at the same time with new details.
    If I create a new record of the master and at the same time create detail records for this master (on the same page), when I submit that the foreign key of the details field is not filled in. So only one master record gets inserted into the table and record line is not inserted.

    When I have everything first create a master without a detail and edit this master and then add details so everything's allright (since the primary key field is filled out at the time).

    I just need to confirm that whether in the APEX form master detail, can save master and line record at the same time or is it as master must be registered the 1 and then line must be enterd and saved?

    Please let me know, if this functionality can be achieved in the APEX.

    Hello

    There was an error in the process of pl/sql, you referenced f01 (F01. COUNT) in the loop condition and which should have been f03, also you have assigned the wrong field to what should have been P3_DEPARTMENT_ID

    I fixed that. Also, I'm not 100% sure but I think in order to use the table in the column must be of type text or something (and not hidden), but I can't check now because of lack of time.

    A few mistakes during the presentation, but they are still due to constraints on the other fields.

    FOR I IN 1.APEX_APPLICATION. G_F03. COUNTY

    LOOP

    APEX_APPLICATION. G_F03 (I): =: P3_DEPARTMENT_ID;

    END LOOP;

    Concerning

    Bottom

Maybe you are looking for

  • How to remove malware "bit search for" Safari 9.1.2

    The Safari that I use in my Mac AIR was infected with the malware "bet search. I want to remove it. Help, please.

  • can I use apple pay in London

    can I use apple pay in London

  • I have a TEREDO TUNNELING ADAPTER driver problem

    I'm sorry, now I see how it's done. I put the whole issue in the subject line. I will leave if necessary. I tried Microsoft and they say that it's the correct driver and a (code.10) was its status. Can someone tell me what to do with this?

  • Update BIOS L430 UEFI 2.56 to 2.61 screen black

    Hi guys, been looking around for answers to this, but can not find it more precisely. System details: Lenovo Thinkpad L430 2466 3F1 UEFI BIOS 2.56 installed 120GB SSD installed when I bought (2nd hand but listed as 'new' - do not know how the image o

  • update a PC offline, Windows XP SP3

    Hello I need to update a PC that is offline. It has Windows XP SP3. I am aware that I can d/l updates .iso images and is not a problem. However, I have to d/l the updates each month since my last update? As well, if this is the case, how can I know t