Efficiently retrieving only a set of records ... ?

Hi,
Ours is web centric small-scale ERP. We have lot of reports which display data by pages.
While retrieving records we are using the following type of SQLs:
select col1,col2,.... from (
select rownum srno, col1, col2, ... from tables where ...)
where srno between 1 and 100;
(100 records per page)
But we know that the sub-query is going to do a full table scan and then the main query will filter the records based on the 'srno' column.
Does anybody know any better way of retrieving records without a having the sub-query do a full table scan?
I would really appreciate your response.
TIA.

If you are on Oracle9i, you could use the PL/SQL package DBMS_XMLQUERY to get XML output (optionally you could also
apply an XSLT stylesheet right inside the database to convert it into an HTML). This package has two procedures
setMaxRows => Maximum number of rows to return for your query
setSkipRows => Rows to skip before query results are returned
using this combination, you could call a PL/SQL package with different starting point this package will get you the
rows starting from that row (in XML format or optionally in HTML after applying XSLT).
Once you have the output, you could pass it to the front end and if needed, apply the stylesheet binding there to display
to the client.
You can also take advantage of using bind variables to query for different data values.

Similar Messages

  • Retrieve only a group of records

    Hi,
    Is it possible to retrieve only a particular number of records from the db ? suppose, if there are 100 records, Can I retrieve only the 10 records which I need, thereby I can improve the performance by not reading the other 90 records from the db ?

    Hello,
    yes, it is possible. You can use an index (secondary database) with DUPSORT for instance. But take care that an index consumes storage on disk. So, it is better if you use it quite often. Of course, you can have many index for one primary database.
    You can use cursors as well like a cursor on an index.
    You can look into the documentation "Getting started with Berkeley DB for C"
    http://www.oracle.com/technology/documentation/berkeley-db/db/index.html
    You have both the HTML version and the PDF version.

  • How to fetch 2 set of records in MII from SQL procedure

    Hi Experts,
    I am invoking a SQL procedure from MII which return 2 set of records. But at MII I am able to get only first set of records. Is there any configuration required at MII side or SQL side to get both set of records in MII?
    Here is the SQL Query Structure
    Create procedure Sample_Proc
      @Param1 Varchar(10),
      @Param2 varchar(10),
      @Param3 Varchar(20) OUT,
      SET INCOUNT ON;
    AS
    Begin
      *//Selection statements//*
    END
    SP Executing in MII
    Declare @Param1,
      @Param2,
      @Param3,
    Exec Sample_Proc
      @Param1='name',
      @Param2='Id',
      @Param3=@Param3 OUTPUT,
    Select @Param3
    Our SP is returning values (Say Recordset1)based on the input parameters 1 and 2 , along with Parameter3 value(Say Recordset2) in MS SQL server but in MII its returning only the values(Recordset1) ... how to fetch recordset2 values in MII
    I hope MII can return 2 set of records (rowsets) after executing the procedure.
    MII version -> 12.2.3 Build(182)
    Thanks & Regards,
    Rajasekhar Kantepalli

    Hi Swaroop,
    With MII 14.0 SP5 Patch 11, in a transaction, I get following XML output for a query that executes an SP(returning multiple resultSets) :
    And, results in this format can surely be used for further processing in an MII transaction.
    Thanks Rajasekhar, got to know about this because of your query.
    regards,
    Manisha

  • ESB Process reads a Batch file for a limited set of records only..?

    Dear All,
    I am having an ESB process that reads a Batch file (csv) that has around 10,000 Products information.
    I have another BPEL process that will create the Product in Oracle Apps through standard API (Main BPEL process that calls a child process for creating product).
    I am invoking the BPEL process from ESB, and that works fine.
    Now, the Issue is: I am able to create at a time around 10 Products (the main process calls the child process in a loop.). The main process instance is not getting created but the child process instance is getting created for a set of records, afterwards the child process instances get stops creating. The main process instance could not be found in the console. Not getting why the process is not getting visible as well it is not completing the process.
    What could be the problem for this... Am I need to change any environment configurations...?
    Please update...
    Many Thanks in advance...

    Does this apply to you?
    https://social.technet.microsoft.com/Forums/en-US/9ccd8e50-b0af-4f58-9787-6435834e4c52/dfsr-not-working-on-new-windows-2008r2-server
    Thanks for the link, but no - not the same scenario although the error is the same.   The RGs I'm working with are all in sync and communication is working, it's just getting the backlog reported correctly.
    To reiterate, I can paste two versions of the exact command into the DOS window buffer; one copied from OneNote and one copied from my batch file.  Executing the one from OneNote succeeds and reports the RG in sync and the one copied from the batch
    file fails.
    I can repeat the results by up arrow once to the command pasted into the buffer from the batch file and see it fail.  Then up arrow twice to retrieve the command pasted from OneNote into the buffer and it will report correctly (illustrated in the grahic).
    Let me add that the command in the batch file was originally copied from OneNote and pasted in to the batch file; as if going into the batch file somehow corrupts it.
    - a -

  • Retrieving latest updated or inserted records without using a trigger

    I have to retrieve the latest updated/inserted records from a set of database tables. Say, if 'n' sets of different records have been updated or inserted into one or more different database tables then all the 'n' records of data should be retrieved using a java code without using a trigger.

    helpmeplz wrote:
    Thanks for your reply.
    But I don't know when or from where or what kind of data gets inserted/updated into the tables. I need a listener or a component which can handle events occured on the particular set of database tables, and get the event data. the java code should get the updated/inserted rows that have been inserted into a set of database tables by a third party.
    Please lemme know how I can do this.Realistically you can't.
    If and only if the tables have a modification timestamp then you could use that. Every table would need it.
    Other than that the only othe possibility would require that you keep an entire copy of each table in the memory, poll at a set interval and then do an entire comparison for each table. For very small data volumes (on the target tables) that is practical. For larger volumes it isn't.

  • Same set of Records not in the same Data package of the extractor

    Hi All,
    I have got one senario. While extracting the records from the ECC based on some condition I want to add some more records in to ECC. To be more clear based on some condition I want to add addiional lines of data by gving APPEND C_T_DATA.
    For eg.
    I have  a set of records with same company code, same contract same delivery leg and different pricing leg.
    If delivery leg and pricing leg is 1 then I want to add one line of record.
    There will be several records with the same company code contract delivery leg and pricing leg. In the extraction logic I will extract with the following command i_t_data [] = c_t_data [], then sort with company code, contract delivery and pricing leg. then Delete duplicate with adjustcent..command...to get one record, based on this record with some condition I will populate a new line of record what my business neeeds.
    My concern is
    if the same set of records over shoot the datapackage size how to handle this. Is there any option.
    My data package size is 50,000. Suppose I get a same set of records ie same company code, contract delivery leg and pricing leg as 49999 th record. Suppose there are 10 records with the same characteristics the extraction will hapen in 2 data packages then delete dplicate and the above logic will get wrong. How I can handle this secnaio. Whether Delta enabled function module help me to tackle this. I want to do it only in Extraction. as Data source enhancement.
    Anil.
    Edited by: Anil on Aug 29, 2010 5:56 AM

    Hi,
    You will have to do the enhancement of the data source.
    Please follow the below link.
    You can write your logic to add the additional records in the case statement for your data source.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c035c402-3d1a-2d10-4380-af8f26b5026f?quicklink=index&overridelayout=true
    Hope this will solve your issue.

  • How to retrieve only error message through report file

    Hi,
    When there is extract/replicat abended,we need to check complete report file to see the error message.
    I would like to know is there parameter setting available ,so that we can retrieve only required error message.
    For ex. Instead of complete error message to check in report file,i need to see below meesage only,starting from "source Context".
    Source Context :
    SourceModule : [er.main]
    SourceID : [scratch/pradshar/view_storage/pradshar_bugdbrh40_12927937/oggcore/OpenSys/src/app/er/rep.c]
    SourceFunction : [get_map_entry]
    SourceLine : [9126]
    ThreadBacktrace : [11] elements
    : [ora/gg/install/replicat(CMessageContext::AddThreadContext()+0x26) [0x5f2ac6]]
    : [ora/gg/install/replicat(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...)+0x7b2) [0x5e9562]]
    : [ora/gg/install/replicat(_MSG_ERR_DB_CLAUSE_ERROR(CSourceContext*, char const*, CMessageFactory::MessageDisposition)+0x92) [0x5b1352]
    : [ora/gg/install/replicat(get_map_entry(char*, int, __wc*, int)+0x1dd6) [0x4fcec6]]
    : [ora/gg/install/replicat [0x5497e5]]
    : [/ora/gg/install/replicat(WILDCARD_check_table(char const*, char const*, int, unsigned int*, int, unsigned int, DBString<777>*, int)+0
    x16b) [0x54b08b]]
    : [ora/gg/install/replicat(REP_find_source_file_wc(char const*, unsigned int, DBString<777>*, int)+0x350) [0x903d50]]
    : [ora/gg/install/replicat [0x90bb0d]]
    : [ora/gg/install/replicat(main+0x84b) [0x5081ab]]
    : [lib64/libc.so.6(__libc_start_main+0xf4) [0x2b87d13469b4]]
    : [ora/gg/install/replicat(__gxx_personality_v0+0x1da) [0x4e479a]]
    2012-07-09 02:20:48 ERROR OGG-00919 Error in COLMAP clause.
    --------------------------------------------------------------------------------------------------------------------------------------------------------

    Nice..i think awk is better option.
    Just one thing.awk command only displays part of the information instead of complete below information.
    Ex: egrep -q ERROR dirrpt/PODS00C1.rpt && awk '/^Source Context/,/ERROR/ { print $0 }' dirrpt/PODS00C1.rpt
    [22:00]goldengate]$ egrep -q ERROR dirrpt/PODS00C1.rpt && awk '/^Source Context/,/ERROR/ { print $0 }' dirrpt/PODS00C1.rpt
    Source Context :
    SourceModule : [ggdb.ora.sess]
    SourceID : [scratch/pradshar/view_storage/pradshar_bugdbrh40_12927937/oggcore/OpenSys/src/gglib/ggdbora/ocisess.c]
    SourceFunction : [OCISESS_try]
    SourceLine : [500]
    ThreadBacktrace : [12] elements
    : [orashare/gg/navc1/extract(CMessageContext::AddThreadContext()+0x26) [0x6705e6]]
    : [orashare/gg/navc1/extract(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...)+0x7b2) [0x667082]]
    : [orashare/gg/navc1/extract(_MSG_ERR_ORACLE_OCI_ERROR_WITH_DESC(CSourceContext*, int, char const*, char const*, CMessageFactory::MessageDisposition)+0xa6) [0x61f2c6]]
    Where as i would like to see complete information including ERROR details as mentioned below.Do you have any awk command for this?
    Required below output:
    Source Context :
    SourceModule : [ggdb.ora.sess]
    SourceID : [scratch/pradshar/view_storage/pradshar_bugdbrh40_12927937/oggcore/OpenSys/src/gglib/ggdbora/ocisess.c]
    SourceFunction : [OCISESS_try]
    SourceLine : [500]
    ThreadBacktrace : [12] elements
    : [orashare/gg/navc1/extract(CMessageContext::AddThreadContext()+0x26) [0x6705e6]]
    : [orashare/gg/navc1/extract(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...)+0x7b2) [0x667082]]
    : [/orashare/gg/navc1/extract(_MSG_ERR_ORACLE_OCI_ERROR_WITH_DESC(CSourceContext*, int, char const*, char const*, CMessageFactory::MessageDisp
    osition)+0xa6) [0x61f2c6]]
    : [orashare/gg/navc1/extract(OCISESS_try(int, OCISESS_context_def*, char const*, ...)+0x353) [0x5a3d53]]
    : [orashare/gg/navc1/extract(OCISESS_logon(OCISESS_context_def*, char const*, char const*, char const*, int, int, int)+0x89c) [0x5a596c]]
    : [orashare/gg/navc1/extract(DBOCI_init_connection_logon(char const*, char const*, char const*, int, int, int, char*)+0x74) [0x5931a4]]
    : [orashare/gg/navc1/extract [0x597918]]
    : [orashare/gg/navc1/extract(gl_odbc_param(char const*, char const*, char*)+0x3b) [0x597f1b]]
    : [orashare/gg/navc1/extract [0x520b96]]
    : [orashare/gg/navc1/extract(main+0x1ce) [0x52726e]]
    : [lib64/libc.so.6(__libc_start_main+0xf4) [0x2af768923994]]
    : [orashare/gg/navc1/extract(__gxx_personality_v0+0x1ea) [0x4f3aba]]
    2012-09-06 16:48:50 ERROR OGG-00664 OCI Error beginning session (status = 1017-ORA-01017: invalid username/password; logon denied).
    2012-09-06 16:48:50 ERROR OGG-01668 PROCESS ABENDING.

  • How to devide the set of records into groups in SQL itself.

    Hi , i am using 10.2.4.0 of oracle.
    I am having one requirement, in which i have to devide the set of records into certain groups , so that they can be executed partly but not in one run.
    So in the 'SELECT' clause itself i want to asssign particular value (may be 1 )to first 50000 records then another value(may be 2) to next 10000, like wise. And again the total count of records will also varry time to time , if the total count of record set is less than 10000 , then it should only assign '1' to all the records. i will set the group values (1,2,3...) as another column itself.
    Can you please let me know if this can be done in SQL without going for PLSQL?

    Hi,
    That's called a Pagination Query , and here's one way to do it:
    WITH     got_grp          AS
         SELECT     x.*
         ,     CEIL ( ROW_NUMBER () OVER (ORDER BY  x_id) 
                   / 50000
                   )          AS grp
         FROM     table_x  x
    --     WHERE     ...          -- If you need any filtering, put it here
    SELECT     *               -- Or list the columns you want
    FROM     got_grp
    WHERE     grp     = 1
    ;ROW_NUMBER () OVER (ORDER BY x_id)     assigns unique integers 1, 2, 3, ... to all all rows, in the same order as x_id (even if x_id is not unique).
    CEIL (ROW_NUMBER () OVER (ORDER BY x_id) / 50000)     maps the 1st 50,000 of those numbers to 1, the 2nd 50,000 to 2, and so on.
    Analytic functions (like ROW_NUMBER) as computed after the WHERE clause is applied, so, to use the results in a WHERE clause, then you need to compute them in a sub-query. If you just want to display the number, and not use it in a WHERE clause, then you don't need a sub-query.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
    In the case of a DML operation (such as UPDATE) the sample data should show what the tables are like before the DML, and the results will be the contents of the changed table(s) after the DML.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using.
    See the forum FAQ {message:id=9360002}

  • Pass a set of Records form Form to a Report

    Hi,
    Lets say that I've already fetched a set of records on Oracle Form, and I want to pass these reocrds to a Report " on the Report I dont wana use range or where clause to give me these recods"
    Any ideas how to do that please?
    Thanks!

    Passing a (Forms) Record Group as DATA_PARAMETER to Reports:
    First example:
    Forms code (in WHEN-BUTTON-PRESSED trigger) calls reports module
    and sends record group "rg_dept" (populated from :SYSTEM.LAST_QUERY) as parameter:
    DECLARE
    rg_id_l RECORDGROUP;
    rg_name_l VARCHAR2 (30) := 'RG_DEPT';
    status_l NUMBER;
    pl_id_l PARAMLIST;
    pl_name_l VARCHAR2 (30) := 'PARAM_LIST';
    BEGIN
    rg_id_l := FIND_GROUP (rg_name_l);
    IF NOT ID_NULL (rg_id_l) THEN
    DELETE_GROUP (rg_id_l);
    END IF;
    rg_id_l := CREATE_GROUP_FROM_QUERY (rg_name_l, :SYSTEM.LAST_QUERY);
    status_l := POPULATE_GROUP (rg_id_l);
    IF status_l <> 0 THEN
    RAISE FORM_TRIGGER_FAILURE;
    END IF;
    pl_id_l := GET_PARAMETER_LIST (pl_name_l);
    IF NOT ID_NULL (pl_id_l) THEN
    DESTROY_PARAMETER_LIST (pl_id_l);
    END IF;
    pl_id_l := CREATE_PARAMETER_LIST (pl_name_l);
    ADD_PARAMETER (pl_id_l, 'Q_1', DATA_PARAMETER, rg_name_l);
    RUN_PRODUCT (REPORTS, 'rec_group', SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id_l, NULL);
    END;
    Reports module must have query with the same name as parameter in ADD_PARAMETER
    statement (in this code - "Q_1"), and SQL Query Statement in Reports must have
    same number and type of columns as record group, for example:
    SELECT ROWID, 1 deptno, 'x' dname, 'x' loc FROM DUAL
    And - we can't pass a DATA_PARAMETER to a child query in Report Builder.
    Data passing is supported only for master queries.
    Second example:
    Forms transfers to Reports records from "dept" block,
    using non-query record group (populated from Forms "dept" block in a LOOP):
    DECLARE
    rg_id_l RECORDGROUP;
    rg_name_l VARCHAR2 (30) := 'DEPT';
    row_count_l NUMBER;
    rgc_id_l GROUPCOLUMN;
    pl_id_l PARAMLIST;
    pl_name_l VARCHAR2 (30) := 'PARAM_LIST';
    BEGIN
    rg_id_l := FIND_GROUP (rg_name_l);
    IF NOT ID_NULL (rg_id_l) THEN
    DELETE_GROUP (rg_id_l);
    END IF;
    rg_id_l := CREATE_GROUP (rg_name_l);
    rgc_id_l := ADD_GROUP_COLUMN (rg_id_l, 'deptno', NUMBER_COLUMN);
    rgc_id_l := ADD_GROUP_COLUMN (rg_id_l, 'dname', CHAR_COLUMN, 14);
    rgc_id_l := ADD_GROUP_COLUMN (rg_id_l, 'loc', CHAR_COLUMN, 13);
    GO_BLOCK ('dept');
    FIRST_RECORD;
    row_count_l := 0;
    LOOP
    row_count_l := row_count_l + 1;
    ADD_GROUP_ROW (rg_id_l, row_count_l);
    SET_GROUP_NUMBER_CELL (rg_name_l || '.deptno', row_count_l, :dept.deptno);
    SET_GROUP_CHAR_CELL (rg_name_l || '.dname', row_count_l, :dept.dname);
    SET_GROUP_CHAR_CELL (rg_name_l || '.loc', row_count_l, :dept.loc);
    EXIT WHEN :SYSTEM.LAST_RECORD = 'TRUE';
    NEXT_RECORD;
    END LOOP;
    IF row_count_l = 0 THEN
    MESSAGE ('Nothing to print'); PAUSE;
    RETURN;
    END IF;
    pl_id_l := GET_PARAMETER_LIST (pl_name_l);
    IF NOT ID_NULL (pl_id_l) THEN
    DESTROY_PARAMETER_LIST (pl_id_l);
    END IF;
    pl_id_l := CREATE_PARAMETER_LIST (pl_name_l);
    ADD_PARAMETER (pl_id_l, 'Q_1', DATA_PARAMETER, rg_name_l);
    RUN_PRODUCT (REPORTS, 'REC_GROUP_REPORT', SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id_l, NULL);
    END;
    This works in Forms 6i. In Forms 9i we must use RUN_REPORT_OBJECT instead of RUN_PRODUCT
    (see Oracle MetaLink document 110495.1 "Passing a Record Group to Reports Using RUN_REPORT_OBJECT").
    Regards,
    Zlatko Sirotic

  • Message no. 26269 : Status can only be set when all originals are stored

    Hi,
    While changing status in cv02n, i am getting the below message no-Message no. 26269 : Status can only be set when all originals are stored. I am not getting the message solution in google. please guide me how to come over from this message.
    Regards,
    Mastan.

    Collegues! Have you any idea?
    Found this - [recommendation|http://help.sap.com/saphelp_47x200/helpdata/en/0c/b98e3c90347b17e10000000a114084/content.htm] - how to, but there so simple scenario without details about standart functionality.
    Check In
    You can check in originals, which are saved in the local network, into a storage system. The following originals are indicated by the  icon:
    Originals that are to be checked in for the first time.
    Originals that have already been checked in, and loaded into the local network for changing.
    To do this start WebDocuments. Process the document info record in the change mode.
    Select the original in the Originals dataset.
    Choose Check In. The system determines the storage system based on the system settings, and checks in the original.
    You return to the data sheet. The original application file is indicated by the Checked In  icon.
    Save the document.
    Very simple, but not work, and no details. Castle icon are not locked. DELETE, CANCEL - work, but not CNANGE.
    Maybe my storage system cannot determine the storage system? If it is right, so where can i maintain this option?

  • Most efficient/quickest way to set NTFS permissions in PowerShell

    Hello all,
    Trying to figure out what the most efficient/quickest way to set NTFS permissions via PowerShell is. I am currently using ICACLS but it is taking FOREVER as I can't figure out how to make inheritance work with this command.
    This has prompted me to begin looking at other options for setting NTFS permissions in PowerShell, and I wondered what everyone here likes to use for this task in PowerShell?

    Ah ok. Unfortunately, my ICACLS is taking FOREVER. Here is the code I'm using:
    ICACLS "C:\users\[user]\Desktop\test" /grant:r ("[user]" + ':r') /T /C /Q
    However:
    1.  I can't figure out how to make the inheritance parameter work with ICACLS
    2. If I do make the inheritance parameter work with ICACLS, I still need a way to add the permission to child objects that aren't inheriting.
    Any tips on how to improve performance of ICACLS?
    1. icacls folder /grant GROUPNAME:(OI)(CI)(F)  (i will post corrected code later, this works in CMD but not powershell couse of bracers)
    2.  get-childitem -recurse -force |?{$_.psiscontainer} |%{icacls ....}  (or u can list only folders where inheritance is disabled and apply icacls just on them)
    I think jrv and Mekac answered the first question about inheritance flags. I would just add that you probably don't want to use the /T switch with icacls.exe because that appears to set an explicit entry on all child items (that's probably why it's taking
    so long).
    For your second question, I'd suggest using the Get-Acl cmdlet. It throws terminating errors, so I usually wrap it in a try/catch block. Something like this might work if you just wanted the paths to files/folders that aren't inheriting permissions:
    dir $Path -Recurse | ForEach-Object {
    try {
    Get-Acl $_.FullName | where { $_.AreAccessRulesProtected } | ForEach-Object { Convert-Path $_.Path }
    catch {
    Write-Error ("Get-Acl error: {0}" -f $_.Exception.Message)
    return
    If you're looking for speed/performance, you don't want to just use the PowerShell Access Control (PAC) module that Mike linked to above by itself. It's implemented entirely in PowerShell, so it's incredibly slow right now (unless you use it along with Get-Acl
    / see below for an example). I'm slowly working on creating a compiled version that is much faster, and I think I'm pretty close to having something that I can put in the gallery.
    Since I wasn't sure which command would give you the best results, I used Measure-Command to test a few different ones. Each of the following four commands should do the exact same thing. Here are my results (note that I just ran the commands a few times
    and averaged the results on a test system; this wasn't very rigorous testing):
    # Make sure that this folder and user/group exist:
    $Path = "D:\TestFolder"
    $Principal = "TestUser"
    # Native PowerShell/.NET -- Took about 15 ms
    $Acl = Get-Acl $Path
    $Acl.AddAccessRule((New-Object System.Security.AccessControl.FileSystemAccessRule(
    $Principal,
    "Read", # [System.Security.AccessControl.FileSystemRights]
    "ContainerInherit, ObjectInherit", # [System.Security.AccessControl.InheritanceFlags]
    "None", # [System.Security.AccessControl.PropagationFlags]
    "Allow" # [System.Security.AccessControl.AccessControlType]
    (Get-Item $Path).SetAccessControl($Acl)
    # PAC Module 3.0 w/ PowerShell/.NET commands -- Took about 35 ms
    $Acl = Get-Acl $Path | Add-AccessControlEntry -Principal $Principal -FolderRights Read -PassThru
    (Get-Item $Path).SetAccessControl($Acl)
    # icacls.exe -- Took about 40ms
    icacls.exe $Path /grant "${Principal}:(OI)(CI)(R)"
    # PAC Module 3.0 w/o Get-Acl -- Took about 350 ms
    Add-AccessControlEntry -Path $Path -Principal $Principal -FolderRights Read -Force
    Unless I messed something up, it looks like the native PowerShell/.NET commands are faster than icacls.exe, at least for modifying a single folder's DACL.

  • Find the last value of one set of records

    Hi friends,
    i have e set of records
    Customer_old_id customer_new_id start_date
    1001 1010 01-jan-07
    1010 1051 15-feb-08
    1051 1070 01-jan-09
    5001 5020 01--jan-05
    5020 5100 01-jun-06
    I would like to create a new set of records with values
    Customer_old_id customer_new_id start_date customer_last_id last_date
    1001 1010 01-jan-07 1070 01-jan-09
    1010 1051 15-feb-08 1070 01-jan-09
    1051 1070 01-jan-09 1070 01-jan-09
    5001 5020 01--jan-05 5100 01-jun-06
    5020 5100 01-jun-06 5100 01-jun-06
    Thanks in Advance
    Mark

    Hi, Mark,
    INSERT INTO table_x
    (     customer_old_id
    ,     customer_new_id
    ,     start_date
    ,     customer_last_id
    ,     last_date
    SELECT     customer_old_id
    ,     customer_new_id
    ,     start_date
    ,     CONNECT_BY_ROOT customer_new_id     -- customer_last_id
    ,     CONNECT_BY_ROOT start_date     -- last_date
    FROM     table_x
    START WITH     customer_new_id     NOT IN     (
                             SELECT     customer_old_id
                             FROM     table_x
    CONNECT BY     custormer_new_id     = PRIOR customer_old_id;(Untested)
    You have a parent-child relationshiip. If a row has customer_new_id = x, then the row with customer_old_id = x is its parent. That relationship is spelled out in the CONNECT BY clause. (Perhaps you normally think of the parent-child roles as being the opposite of what I described. That's fine, but there is no CONNECT_BY_LEAF operator, only CONNECT_BY_ROOT, so for purposes of this query, the rows with the values that need to be copied to all their relatives are the roots.)
    If a row has customer_new_id = x, but there is no row where customer_old_id = x, then that row has no parent: it is a root. Those rows are found in the START WITH clause.
    The customer_new_id and start_date become the customer_last_id and last_date of each root and all its descendants. CONNECT_BY_ROOT retains these values as the query traverses the tree, from parent to child.

  • Master-Detail only shows the first record of the Master's data

    I have an ADF Master Table, Detail table. I use ExcuteWithParams on the Master Table. When executed from a button (Button has partial submit = true for button, Master Table has PartialTrigger on button, and Detail table has PartialTrigger on Master table and button), it works fine. However, I want to pass the parameters in pageFlowScope variables, and have the ExecuteWithParams invoked upon page load. When I try to do this, the Detail table only shows the first record of the Master's data, no mater what row is clicked on the Master table.
    Master table now has no PartialTrigger, and Detail table has PartialTrigger on Master table. In my pageDef, I used an invoke action as follows:
    <invokeAction Binds="ExecuteWithParams" id="invokeExecuteWithParams"
    Refresh="always"/>
    What am I missing? I am using verion 11.1.1.3. Any help would be much appreciated.
    Thanks,
    Jessica

    Yes, it works when I drag the data control as a master detail without filtering any data. I want the user to be able to set search criteria to filter the data in the master table (For example, only pull back data with a transaction date between :startdate and :enddate). I can get it to work if I execute from an executewithparams button on the page, but not if I want to invoke the executewithparams upon page load with the parameter set by pageflowscope variables.
    Thank you for responding.
    Jessica

  • SQL Query to retrieve one line from duplicate records

    Hi
    I have one table which contains duplicate records in multiple column but the difference is in one column which contains the value 0 or positive. The query i want is to retrieve only the line with the positive value for only the duplicated records.
    here below a sample data for your reference:
    CREATE TABLE TRANS
      CALLTRANSTYPE     NVARCHAR2(6),
      ORIGANI                 NVARCHAR2(40),
      TERMANI                 NVARCHAR2(40),
      STARTTIME               DATE,
      STOPTIME                DATE,
      CELLID                  NVARCHAR2(10),
      CONNECTSECONDS          NUMBER,
      SWITCHCALLCHARGE        NUMBER
    INSERT INTO TRANS VALUES ('REC','555988801','222242850',to_date('05/15/2012 09:15:00','mm/dd/yyyy hh24:mi:ss'),to_date('05/15/2012 09:15:25','mm/dd/yyyy hh24:mi:ss'),null,25,0)
    INSERT INTO TRANS VALUES ('REC','555988801','222242850',to_date('05/15/2012 09:15:00','mm/dd/yyyy hh24:mi:ss'),to_date('05/15/2012 09:15:25','mm/dd/yyyy hh24:mi:ss'),null,25,18000)
    INSERT INTO TRANS VALUES ('REC','555988801','222242850',to_date('05/15/2012 09:18:03','mm/dd/yyyy hh24:mi:ss'),to_date('05/15/2012 09:18:20','mm/dd/yyyy hh24:mi:ss'),null,17,0)
    The output i want to have is:
    CALLTRANSTYPE     ORIGANI          TERMANI          STARTTIME          STOPTIME          CELLID          CONNECTSECONDS          SWITCHCALLCHARGE
    REC          555988801     222242850     05/15/2012 09:15:00     05/15/2012 09:15:25               25               18000
    REC          555988801     222242850     05/15/2012 09:18:03     05/15/2012 09:18:20               17               0 Thank you.

    Hi ekh
    this is the query i want to have, thank you for the help:
    SQL> Select *from
    select CALLTRANSTYPE,ORIGANI,TERMANI,STARTTIME,STOPTIME,CELLID,CONNECTSECONDS,SWITCHCALLCHARGE
    ,row_number() over( partition by     STARTTIME    ,STOPTIME order by    SWITCHCALLCHARGE DESC     ) rn from TRANS
    where rn=1;  
    CALLTR ORIGANI                                  TERMANI                                  STARTTIME STOPTIME  CELLID     CONNECTSECONDS SWITCHCALLCHARGE     RN
    REC    555988801                                222242850                                15-MAY-12 15-MAY-12                        25            18000      1
    REC    555988801                                222242850                                15-MAY-12 15-MAY-12                        17                0      1Regrads
    Lucienot.

  • L9 - all tracks seem to "software monitor" when set to record! BUG?!

    Hi Guys,
    Not sure if this is another Logic 9 bug or if I am just going crazy!
    Often when recording tracking parts, I need to record three or four tracks at the same time. For example, today I was recording vocals, keyboard and bass.
    I always monitor the vocals through Logic, so the singer has some reverb in real time. However, for zero latency monitoring on piano and bass, I would usually just monitor them straight through the mixer and not through Logic.
    To achieve this in Logic 8, I would press the "software monitoring" button (the green one beside the transport window). I'd also press the orange "Low latency mode" button to make sure the tracks that were software monitored would not have any latency.
    Then I would select record for all tracks I was recording, and I would press the "i" button (orange button for input monitoring) for the tracks that I actually wanted to software monitor. Tracks with "i" pressed (usually just vocals) would monitor through Logic with effects, the rest would just be monitored through the mixer.
    In Logic 9, this isn't working! Even if I only press the "i" button on one track, ALL of the tracks are coming through Logic. It seems to be applying software monitoring to ANY TRACK THAT IS IN RECORD MODE, even if the input button isn't pressed for that track!
    So I either have to have ALL record-enabled tracks software monitored (which induces a little bit of latency for the keys and bass) or NONE (and leave the vocalist without any real-time effects in the mix while he sings).
    Am I missing something here? Is there a new setting somewhere that automatically sets all record-enabled tracks to software monitor mode when the software monitoring button is pressed in the transport bar?
    OR... is this a new bug?! It's a big one if it is!
    I'd love to hear what other people think... or if anyone has a suggestion that might help with this? I might just be missing something obvious here, but I don't think so...
    Thanks heaps guys!
    Mike

    yeloop wrote:
    Hi Guys,
    Not sure if this is another Logic 9 bug or if I am just going crazy!
    Often when recording tracking parts, I need to record three or four tracks at the same time. For example, today I was recording vocals, keyboard and bass.
    I always monitor the vocals through Logic, so the singer has some reverb in real time. However, for zero latency monitoring on piano and bass, I would usually just monitor them straight through the mixer and not through Logic.
    To achieve this in Logic 8, I would press the "software monitoring" button (the green one beside the transport window). I'd also press the orange "Low latency mode" button to make sure the tracks that were software monitored would not have any latency.
    That's not what Low Latency Mode does, it only bypasses high latency inducing plugins, there's a threshold setting in Logic. But that's not the problem...
    Then I would select record for all tracks I was recording, and I would press the "i" button (orange button for input monitoring) for the tracks that I actually wanted to software monitor. Tracks with "i" pressed (usually just vocals) would monitor through Logic with effects, the rest would just be monitored through the mixer.
    That's not how it works here (on version 8.02)
    With software monitoring enabled any track in record mode is passed through Logic's audio engine. Input monitoring only works when a track is -not- record enabled. At least that's how it's working with my RME hardware.
    Perhaps you're thinking of "Auto Input Monitoring", try adding that button to the transport bar and see if that's working the way you expect. Any tracks set to input monitoring and record will pass their signal thru Logic, tracks set to record only, will not. The sequencer has to be running so the vocalist wouldn't hear reverb until you actually start recording.
    pancenter-

Maybe you are looking for