Export specific records from all table? Please help me with my query

hi
there are around 200 tables, I want to take a export of all tables of xyz schema.
My requirement is just a few records of primary key and their relevant records from other tables to be exported by using exp or expdp utility.

Hi Toni...
Thanks for your reply.
Could you please help me understand how to user this expdp query...
and what exactly should i mention in the parfile. I want all relevant records from all tables of primary key. please help me to write a query accordingly.

Similar Messages

  • Need assistance searching records from multiple tables - Please Help!

    Hi, I've been trying to solve this problem for several weeks now, and I have exhausted all of my knowledge and experience.  I need help, and I hope someone here can give me some direction.
    I am using VB 2008, and the CR that comes bundled with VS 2008 Pro.  My database is a SQL Server 2005 CE v3.5 (a *.sdf file).  I am connecting to the database through a dataset, and I am displaying the report in a CrystalReportViewer.
    My dataset consistes of two tables:
    1) tblCustomers which has a primary key "CustID", and contains only customer contact and personal information. 
    2) tblDateVisited which has a primary key of "VisitID", but it also has a column titled "CustID". Basically, every time a customer visits the business, details of that visit are recorded in tblDateVisited, and that record is associated with the customer by their CustID.
    Here's what I'm trying to accomplish:  I want to be able to display only Customer records when the customer has visited and that visit matches certain criteria.  Right now, I am trying to match visits from the "tblVisitDate.PlayerType" column.  If the customer has ever had a visit where they matched a particular player type, I want to see those customer records.
    I don't know what I'm doing wrong, though.  I can search a dataset if I am only querying one table and pulling records from that table.  However, whenever I try to add a second table and perform queries on that table to get records from the first table, I can't return any records. 
    If it helps, I am trying to use one CrystalReportViewer to display multiple reports (user choice) and here's how I'm loading the report into the viewer:
    Me.tblCustomersTableAdapter.Fill(Me.dsPlayerTypeReports.tblCustomers)
    Me.tblDateVisitedTableAdapter.Fill(Me.dsPlayerTypeReports.tblDateVisited)
    Me.ReportFile.SetDataSource(dsPlayerTypeReports.Tables(1))
    I am suspicious that my problem is in the Tables(1) method.  It confuses me that I can only assign one table as a datasource when I obviously need access to two tables to make this selection work. 
    Whatever the case, I'm at the end of my rope with this one.  I'm not prone to giving up, but I'm at a dead end currently. 
    Any attempt to assist me with this will be greatly appreciated, successful or not.
    Thanks in advance!
    -Will

    No, I am connected via ADO.NET.  I don't think SQL CE can connect through ODBC (or if it can, I haven't been able to figure out how, yet).  So this isn't a stored procedure.
    When I examine the link, I can only choose an Inner Join or a Left Outer Join.  Right Outer and Full Outer are not available.  Could this be a problem with the dataset I'm using?
    Could you explain what you mean by display all of the records and then choose the selection criteria?

  • Help - i recently made put together a high quality movie for a relative, it has taken me months to complete and it goes for a total of 9 hours and 43 minutes ,however, it won't let me export the video at all! please help - its taken ages to make it!

    Help - i recently made put together a high quality movie for a relative, it has taken me months to complete and it goes for a total of 9 hours and 43 minutes ,however, it won't let me export the video at all! please help - its taken ages to make it!

    9 hours??!
    Twice the length of a cinema epic?
    How are you expecting to distribute it?
    iDVD encoding settings:
    http://docs.info.apple.com/article.html?path=iDVD/7.0/en/11417.html
    Short version:
    Best Performance is for videos of up to 60 minutes
    Best Quality is for videos of up to 120 minutes
    Professional Quality is also for up to 120 minutes but even higher quality (and takes much longer)
    That was for single-layer DVDs. Double these numbers for dual-layer DVDs.
    Professional Quality: The Professional Quality option uses advanced technology to encode your video, resulting in the best quality of video possible on your burned DVD. You can select this option regardless of your project’s duration (up to 2 hours of video for a single-layer disc and 4 hours for a double-layer disc). Because Professional Quality encoding is time-consuming (requiring about twice as much time to encode a project as the High Quality option, for example) choose it only if you are not concerned abo
    In both cases the maximum length includes titles, transitions and effects etc. Allow about 15 minutes for these.
    You can use the amount of video in your project as a rough determination of which method to choose. If your project has an hour or less of video (for a single-layer disc), choose Best Performance. If it has between 1 and 2 hours of video (for a single-layer disc), choose High Quality. If you want the best possible encoding quality for projects that are up to 2 hours (for a single-layer disc), choose Professional Quality. This option takes about twice as long as the High Quality option, so select it only if time is not an issue for you.
    Use the Capacity meter in the Project Info window (choose Project > Project Info) to determine how many minutes of video your project contains.
    NOTE: With the Best Performance setting, you can turn background encoding off by choosing Advanced > “Encode in Background.” The checkmark is removed to show it’s no longer selected. Turning off background encoding can help performance if your system seems sluggish.
    And whilst checking these settings in iDVD Preferences, make sure that the settings for NTSC/PAL and DV/DV Widescreen are also what you want.
    http://support.apple.com/kb/HT1502?viewlocale=en_US

  • Goto: How to export some data from the tables of an owner with integrity?

    Hi to all,
    Help please: How to export some data from the tables of an owner with integrity?
    My thanks in advance,
    Philips

    Thanks, Peter.
    Well, I am working with release 9.2.0.8.0. But the planning is migrate to 10g this year. So my questions are:
    With Data Pump can export data just from tables owned for me (SCHEMAS = MYOWNER) parameterizing the volume of data (SAMPLE) and filters to table (QUERY), right? But parameterizing a contract table QUERY = "WHERE status NOT IN (2,6) ORDER BY contract ":
    1º- the Data Pump automatically searches for related data in other tables in the owner? ex. parcel table has X records related (fk) with Y contracts not in (2,6): X * SAMPLE records will be randomly exported?
    2º- for the tables without relation (fk) and which are within the owner (MYOWNER) the data is exported only based on the parameter SAMPLE?
    Once again, thank you,
    Philips
    Reading Oracle Docs...

  • How to export some data from the tables of an owner with integrity?

    Hi to all,
    How to export some data from the tables of an owner with integrity?
    I want to bring some data from all tables in a single owner of the production database for development environment.
    My initial requirements are: seeking information on company code (emp), contract status (status) and / or effective date of contract settlement (dt_liq_efetiva) - a small amount of data to developers.
    These three fields are present in the main system table (the table of contracts). Then I thought about ...
    - create a temporary table from the query results table to contract;
    - and then use this temporary table as a reference to fetch the data in other tables of the owner while maintaining integrity. But how? I have not found the answer, because: what to do when not there is the possibility of a join between the contract and any other table?
    I am considering the possibility of consulting the names of tables, foreign keys and columns above, and create dynamic SQL. Conceptually, something like:
    select r.constraint_name "FK name",
    r.table_name "FK table",
    r.column_name "FK column",
    up.constraint_name "Referencing name",
    up.table_name "Referencing table",
    up.column_name "Referencing column"
    from all_cons_columns up
    join all_cons_columns r
    using (owner, position), (select r.owner,
    r.constraint_name fk,
    r.table_name table_fk,
    r.r_constraint_name r,
    up.table_name table_r
    from all_constraints up, all_constraints r
    where r.r_owner = up.owner
    and r.r_constraint_name = up.constraint_name
    and up.constraint_type in ('P', 'U')
    and r.constraint_type = 'R'
    and r.owner = 'OWNERNAME') aux
    where r.constraint_name = aux.fk
    and r.table_name = aux.table_fk
    and up.constraint_name = aux.r
    and up.table_name = aux.table_r;
    -- + Dynamic SQL
    If anyone has any suggestions and / or reuse code to me thank you very much!
    After resolving this standoff intend to mount the inserts in utl_file by a table and create another program to read and play in the development environment.
    Thinking...
    Let's Share!
    My thanks in advance,
    Philips

    Thanks, Peter.
    Well, I am working with release 9.2.0.8.0. But the planning is migrate to 10g this year. So my questions are:
    With Data Pump can export data just from tables owned for me (SCHEMAS = MYOWNER) parameterizing the volume of data (SAMPLE) and filters to table (QUERY), right? But parameterizing a contract table QUERY = "WHERE status NOT IN (2,6) ORDER BY contract ":
    1º- the Data Pump automatically searches for related data in other tables in the owner? ex. parcel table has X records related (fk) with Y contracts not in (2,6): X * SAMPLE records will be randomly exported?
    2º- for the tables without relation (fk) and which are within the owner (MYOWNER) the data is exported only based on the parameter SAMPLE?
    Once again, thank you,
    Philips
    Reading Oracle Docs...

  • Delete a record from a table in a Database with Database Connectivity

    I can't find the function from the Database Connectivity library that allows me to delete a record from a table of the database. I tried to use DB Tools Free Object.vi function but this one deletes only the table created with a query.
    Thankyou

    I have used the sql query as described above and it works fine with access DB and the DB toolkit, the free object vi only deallocated a recordset's references this will noty alter the database since the record is a copy of the databases information.  The SQL delete function is very versatile and you should be able to delete records with no problem.
    Paul
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • Query Issue in Creating a View....Please help me with this query..

    I would like to create a view on this table with four columns
    1. PN#_EXP_DATE
    2. PN#
    3. PN#_EFF_DATE
    4. PN#
    P_S_C     A_C     P     EXP_DT
    21698     13921     1     5/29/2009 3:15:41 PM     
    21698     13921     1     5/29/2009 3:54:57 PM     
    21698     1716656     4     5/29/2009 3:15:41 PM     
    21698     3217     3     5/29/2009 3:15:40 PM     
    21698     3217     3     5/29/2009 3:54:57 PM     
    21698     60559     2     5/29/2009 3:15:41 PM     
    21698     60559     2     5/29/2009 3:54:57 PM     
    I have a trigger on A, which inserts the DML records into B. (Table A and B structure is the almost the same,
                                       where table B will have one extra column exp_dt)
    NOw Table B can have records with same P_S_C and A_C columns and exp_dt will capture the history.
    for example: from the above sample data, let us take first two records..
    P_S_C     A_C     P     EXP_DT
    21698     13921     1     5/29/2009 3:15:41 PM     --- Record 1
    21698     13921     1     5/29/2009 3:54:57 PM     --- Record 2
    from this..
    Note: 1. Table A and Table C can be joined using A.P_S_C and C.R_C to get the start_date.
    2. PN# comes from table D. It contains numbers for the resp. weeks.
    3. PN#_EFF_DATE is the previous immediate previous date for that record in history table (Table B).
    I wanted the data like..
    ---- this is for the second record in the above..
    PN#_EXP_DATE PN# PN#_EFF_DATE PN#
    5/29/2009 3:54:57 PM     214 5/29/2009 3:15:41 PM     214
    ---- this is for the first record in the above..
    PN#_EXP_DATE PN# PN#_EFF_DATE PN#
    5/29/2009 3:54:41 PM     214 ( for this we should query the table C to get the
                        start_date, for this combinatation of P_S_C and A_C in table B
                             where B.P_S_C = C.A_C
                             and that value should be the EFF_DT for this record)
    Please help me with this....
    Thanks in advance..

    Hi All,
    select d.P# as "PN#_EXP_DATE", exp_date
    from daily_prd d, cbs1_assoc_hist b
    where to_char(d.day_date,'MM/DD/YYYY') = to_char(b.exp_date,'MM/DD/YYYY')
    and d.period_type = 'TIMEREPORT';
    This above query gives the output as follows:
    pn#_exp_date exp_date
    214     5/29/2009 3:15:40 PM
    214     5/29/2009 3:15:41 PM
    214          5/29/2009 3:15:41 PM
    214          5/29/2009 3:15:41 PM
    214          5/29/2009 3:54:57 PM
    214          5/29/2009 3:54:57 PM
    214          5/29/2009 3:54:57 PM
    This below is the data from history table (Table B).
    P_S_C     A_C PLACE EXP_DATE
    21698          3217          3     5/29/2009 3:15:40 PM     
    21698          13921          1     5/29/2009 3:15:41 PM     
    21698          1716656          4     5/29/2009 3:15:41 PM     
    21698          60559          2     5/29/2009 3:15:41 PM     
    21698          13921          1     5/29/2009 3:54:57 PM     
    21698          3217          3     5/29/2009 3:54:57 PM     
    21698          60559          2     5/29/2009 3:54:57 PM     
    I got the pn#_exp_date from the Table 'D', for the given exp_date from Table B.
    My question is again....
    CASE - 1
    from the given records above, I need to look for exp_date for the given same P_S_C and A_C.
    in this case we can take the example...
    P_S_C     A_C PLACE EXP_DATE
    21698          3217          3     5/29/2009 3:15:40 PM
    21698          3217          3     5/29/2009 3:54:57 PM
    In this case, the
    pn#_exp_date exp_date     pn#_eff_date eff_date
    214     5/29/2009 3:15:57 PM     < PN# corresponding to the     5/29/2009 3:15:40 PM
                        eff_date .>
                        <Basically the eff_date is
                        nothing but the exp_date only.
                        we should take the immediate before one.
    In this case, our eff_date is '5/29/2009 3:15:40 PM'.
    but how to get this.
    CASE - 2
    from the above sample data, consider this
    P_S_C     A_C PLACE EXP_DATE
    21698     1716656     4     5/29/2009 3:15:41 PM
    In this case, there is only one record for the P_S_C and A_C combination.
    The expected result :
    pn#_exp_date exp_date               pn#_eff_date eff_date
    214     5/29/2009 3:15:41 PM     < PN# corresponding to the     5/29/2009 3:15:40 PM
                        eff_date .>
                   <Basically the eff_date is
                   nothing but the exp_date only.
                        we should take the immediate before one.
    In this case to get the eff_date, we should query the Table 'C', to get the eff_date, which is START_DT column in this table.
    for this join B.P_S_C and C.R_C.
    Hope I am clear now..
    Thanks in advance.....

  • Hi Everyone...Please help me with this query...!

    Please Help me with this doubt as I am unable to understand the logic...behind this code. It's a begineer level code but I need to understand the logic so that I am able to grasp knowledge. Thank you all for being supportive. Please help me.
    //Assume class Demo is inherited from class SuperDemo...in other words class Demo extends SuperDemo
    //Volume is a method declared in SuperDemo which returns an integer value
    //weight is an integer vairable declared in the subclass which is Demo
    class Example
         public static void main(String qw[])
              Demo ob1=new Demo(3,5,7,9);
    //Calling Constructor of Demo which takes in 4 int parameters
              SuperDemo ob2=new SuperDemo();
              int vol;
              vol=ob1.volume();
              System.out.println("Volume of ob1 is " + vol);
              System.out.println("Weight of ob1 is " + ob1.weight);
              System.out.println();
              ob2=ob1;
    }Can someone please make me understand --- how is this possible and why !
    If the above statement is valid then why not this one "System.out.println(ob2.weight);"
    Thanks Thanks Thanks!

    u see the line wherein I am referencing the objectof
    a subclass to the superclass...right? then why we
    can't do System.out.println(ob2.weight)?You need to distinguish two things:
    - the type of the object, which determines with the
    object can do
    - the type of the reference to the object, which
    determines what you see that you can do
    Both don't necessarily have to match. When you use a
    SuperDemo reference (obj2) to access a Demo instance
    (obj1), for all you know, the instance behind obj2 is
    of type SuperDemo. That it's in reality of type Demo
    is unknown to you. And usually, you don't care -
    that's what polymorphism is about.
    So you have a reference obj2 of type SuperDemo.
    SuperDemo objects don't have weight, so you don't see
    it - even though it is there.So from ur explanation wat I understand is - Even though u reference a subclass object to a superclass, u will only be able to access the members which are declared in the superclass thru the same...right
    ?

  • Please help me with this query -- i am trying with Dense rank

    version 10g
    i received a quote for an account. if the same quote is received under different account then i should mark the previous account received as deleted.
    please help me .
    /* Formatted on 2010/06/28 14:13 (Formatter Plus v4.8.8) */
    WITH temp AS
         (SELECT '1-11TWQL' quote_id, 'COPS' ACCOUNT, 'Ordered' status,
                 TO_DATE ('12/23/2009 3:37:54',
                          'mm/dd/yyyy hh:mi:ss PM'
                         ) captured_date
            FROM DUAL
          UNION ALL
          SELECT '1-11TWQL', 'COPS', 'RFS',
                 TO_DATE ('12/23/2009 3:37:50', 'mm/dd/yyyy hh:mi:ss PM')
            FROM DUAL
          UNION ALL
          SELECT '1-11TWQL', 'COPS', 'Rejected',
                 TO_DATE ('12/23/2009 3:37:52', 'mm/dd/yyyy hh:mi:ss PM')
            FROM DUAL
          UNION ALL
          SELECT '1-11TWQL', 'COPS', 'Validated',
                 TO_DATE ('12/23/2009 3:37:51', 'mm/dd/yyyy hh:mi:ss PM')
            FROM DUAL
          UNION ALL
          SELECT '1-11TWQL', 'D1', 'Ordered',
                 TO_DATE ('12/23/2009 3:04:24', 'mm/dd/yyyy hh:mi:ss PM')
            FROM DUAL
          UNION ALL
          SELECT '1-11TWQL', 'D1', 'RFS',
                 TO_DATE ('12/23/2009 3:04:23', 'mm/dd/yyyy hh:mi:ss PM')
            FROM DUAL
          UNION ALL
          SELECT '1-11TWQL', 'D1', 'Rejected',
                 TO_DATE ('12/23/2009 3:04:22', 'mm/dd/yyyy hh:mi:ss PM')
            FROM DUAL
          UNION ALL
          SELECT '1-11TWQL', 'D1', 'Validated',
                 TO_DATE ('12/23/2009 3:04:23', 'mm/dd/yyyy hh:mi:ss PM')
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'COPS', 'RFS',
                 TO_DATE ('3/5/2010 12:04:24', 'mm/dd/yyyy hh:mi:ss PM')
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'COPS', 'RFS',
                 TO_DATE ('3/16/2010 7:55:50', 'mm/dd/yyyy hh:mi:ss PM')
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'COPS', 'RFS',
                 TO_DATE ('3/16/2010 7:55:51', 'mm/dd/yyyy hh:mi:ss PM')
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'COPS', 'Rejected',
                 TO_DATE ('3/5/2010 12:04:24', 'mm/dd/yyyy hh:mi:ss PM')
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'COPS', 'Rejected',
                 TO_DATE ('3/16/2010 7:55:50', 'mm/dd/yyyy hh:mi:ss PM')
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'COPS', 'Rejected',
                 TO_DATE ('3/16/2010 7:55:51', 'mm/dd/yyyy hh:mi:ss PM')
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'COPS', 'Validated',
                 TO_DATE ('12/23/2009 3:37:54', 'mm/dd/yyyy hh:mi:ss PM')
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'COPS', 'Validated',
                 TO_DATE ('12/23/2009 3:37:54', 'mm/dd/yyyy hh:mi:ss PM')
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'COPS', 'Validated',
                 TO_DATE ('12/23/2009 3:37:54', 'mm/dd/yyyy hh:mi:ss PM')
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'D1', 'Ordered',
                 TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM')
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'D1', 'Ordered',
                 TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM')
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'D1', 'RFS',
                 TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM')
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'D1', 'RFS',
                 TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM')
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'D1', 'Validated',
                 TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM')
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'D1', 'Validated',
                 TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM')
            FROM DUAL
          UNION ALL
          SELECT '1-249A8Z', 'COPS', 'Validated',
                 TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM')
            FROM DUAL
          UNION ALL
          SELECT '1-249A8Z', 'COPS', 'Ordered',
                 TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM')
            FROM DUAL)
    SELECT   quote_id, ACCOUNT, status, captured_date,
             DENSE_RANK () OVER (PARTITION BY quote_id ORDER BY quote_id,
              ACCOUNT) rn
    --         ,CASE DENSE_RANK () OVER (PARTITION BY quote_id ORDER BY quote_id,
    --              ACCOUNT)
    --            WHEN 1
    --               THEN 'Y'
    --            ELSE 'N'
    --         END deleted_flag
        FROM temp
    ORDER BY quote_id, captured_date;output required
    WITH temp AS
         (SELECT '1-11TWQL' quote_id, 'COPS' ACCOUNT, 'Ordered' status,
                 TO_DATE ('12/23/2009 3:37:54',
                          'mm/dd/yyyy hh:mi:ss PM'
                         ) captured_date, 'N' deleted_flag
            FROM DUAL
          UNION ALL
          SELECT '1-11TWQL', 'COPS', 'RFS',
                 TO_DATE ('12/23/2009 3:37:50', 'mm/dd/yyyy hh:mi:ss PM'), 'N' deleted_flag
            FROM DUAL
          UNION ALL
          SELECT '1-11TWQL', 'COPS', 'Rejected',
                 TO_DATE ('12/23/2009 3:37:52', 'mm/dd/yyyy hh:mi:ss PM'), 'N' deleted_flag
            FROM DUAL
          UNION ALL
          SELECT '1-11TWQL', 'COPS', 'Validated',
                 TO_DATE ('12/23/2009 3:37:51', 'mm/dd/yyyy hh:mi:ss PM'), 'N' deleted_flag
            FROM DUAL
          UNION ALL
          SELECT '1-11TWQL', 'D1', 'Ordered',
                 TO_DATE ('12/23/2009 3:04:24', 'mm/dd/yyyy hh:mi:ss PM'), 'Y' deleted_flag
            FROM DUAL
          UNION ALL
          SELECT '1-11TWQL', 'D1', 'RFS',
                 TO_DATE ('12/23/2009 3:04:23', 'mm/dd/yyyy hh:mi:ss PM'), 'Y' deleted_flag
            FROM DUAL
          UNION ALL
          SELECT '1-11TWQL', 'D1', 'Rejected',
                 TO_DATE ('12/23/2009 3:04:22', 'mm/dd/yyyy hh:mi:ss PM'), 'Y' deleted_flag
            FROM DUAL
          UNION ALL
          SELECT '1-11TWQL', 'D1', 'Validated',
                 TO_DATE ('12/23/2009 3:04:23', 'mm/dd/yyyy hh:mi:ss PM'), 'Y' deleted_flag
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'COPS', 'RFS',
                 TO_DATE ('3/5/2010 12:04:24', 'mm/dd/yyyy hh:mi:ss PM'), 'Y' deleted_flag
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'COPS', 'RFS',
                 TO_DATE ('3/16/2010 7:55:50', 'mm/dd/yyyy hh:mi:ss PM'), 'Y' deleted_flag
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'COPS', 'RFS',
                 TO_DATE ('3/16/2010 7:55:51', 'mm/dd/yyyy hh:mi:ss PM'), 'Y' deleted_flag
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'COPS', 'Rejected',
                 TO_DATE ('3/5/2010 12:04:24', 'mm/dd/yyyy hh:mi:ss PM'), 'Y' deleted_flag
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'COPS', 'Rejected',
                 TO_DATE ('3/16/2010 7:55:50', 'mm/dd/yyyy hh:mi:ss PM'), 'Y' deleted_flag
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'COPS', 'Rejected',
                 TO_DATE ('3/16/2010 7:55:51', 'mm/dd/yyyy hh:mi:ss PM'), 'Y' deleted_flag
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'COPS', 'Validated',
                 TO_DATE ('12/23/2009 3:37:54', 'mm/dd/yyyy hh:mi:ss PM'), 'Y' deleted_flag
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'COPS', 'Validated',
                 TO_DATE ('12/23/2009 3:37:54', 'mm/dd/yyyy hh:mi:ss PM'), 'Y' deleted_flag
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'COPS', 'Validated',
                 TO_DATE ('12/23/2009 3:37:54', 'mm/dd/yyyy hh:mi:ss PM'), 'Y' deleted_flag
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'D1', 'Ordered',
                 TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM'), 'N' deleted_flag
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'D1', 'Ordered',
                 TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM'), 'N' deleted_flag
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'D1', 'RFS',
                 TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM'), 'N' deleted_flag
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'D1', 'RFS',
                 TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM'), 'N' deleted_flag
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'D1', 'Validated',
                 TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM'), 'N' deleted_flag
            FROM DUAL
          UNION ALL
          SELECT '1-249A8X', 'D1', 'Validated',
                 TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM'), 'N' deleted_flag
            FROM DUAL
          UNION ALL
          SELECT '1-249A8Z', 'COPS', 'Validated',
                 TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM'), 'N' deleted_flag
            FROM DUAL
          UNION ALL
          SELECT '1-249A8Z', 'COPS', 'Ordered',
                 TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM'), 'N' deleted_flag
            FROM DUAL)
    SELECT   quote_id, ACCOUNT, status, captured_date, deleted_flag
        FROM temp
    ORDER BY quote_id, captured_date;

    try to wrap your query to become an in-line view. use a case statement or decode to your derived column RN from the analytic query of DENSE RANK. either way they both will work.
    SQL> WITH temp AS
      2       (SELECT '1-11TWQL' quote_id, 'COPS' ACCOUNT, 'Ordered' status,
      3               TO_DATE ('12/23/2009 3:37:54',
      4                        'mm/dd/yyyy hh:mi:ss PM'
      5                       ) captured_date
      6          FROM DUAL
      7        UNION ALL
      8        SELECT '1-11TWQL', 'COPS', 'RFS',
      9               TO_DATE ('12/23/2009 3:37:50', 'mm/dd/yyyy hh:mi:ss PM')
    10          FROM DUAL
    11        UNION ALL
    12        SELECT '1-11TWQL', 'COPS', 'Rejected',
    13               TO_DATE ('12/23/2009 3:37:52', 'mm/dd/yyyy hh:mi:ss PM')
    14          FROM DUAL
    15        UNION ALL
    16        SELECT '1-11TWQL', 'COPS', 'Validated',
    17               TO_DATE ('12/23/2009 3:37:51', 'mm/dd/yyyy hh:mi:ss PM')
    18          FROM DUAL
    19        UNION ALL
    20        SELECT '1-11TWQL', 'D1', 'Ordered',
    21               TO_DATE ('12/23/2009 3:04:24', 'mm/dd/yyyy hh:mi:ss PM')
    22          FROM DUAL
    23        UNION ALL
    24        SELECT '1-11TWQL', 'D1', 'RFS',
    25               TO_DATE ('12/23/2009 3:04:23', 'mm/dd/yyyy hh:mi:ss PM')
    26          FROM DUAL
    27        UNION ALL
    28        SELECT '1-11TWQL', 'D1', 'Rejected',
    29               TO_DATE ('12/23/2009 3:04:22', 'mm/dd/yyyy hh:mi:ss PM')
    30          FROM DUAL
    31        UNION ALL
    32        SELECT '1-11TWQL', 'D1', 'Validated',
    33               TO_DATE ('12/23/2009 3:04:23', 'mm/dd/yyyy hh:mi:ss PM')
    34          FROM DUAL
    35        UNION ALL
    36        SELECT '1-249A8X', 'COPS', 'RFS',
    37               TO_DATE ('3/5/2010 12:04:24', 'mm/dd/yyyy hh:mi:ss PM')
    38          FROM DUAL
    39        UNION ALL
    40        SELECT '1-249A8X', 'COPS', 'RFS',
    41               TO_DATE ('3/16/2010 7:55:50', 'mm/dd/yyyy hh:mi:ss PM')
    42          FROM DUAL
    43        UNION ALL
    44        SELECT '1-249A8X', 'COPS', 'RFS',
    45               TO_DATE ('3/16/2010 7:55:51', 'mm/dd/yyyy hh:mi:ss PM')
    46          FROM DUAL
    47        UNION ALL
    48        SELECT '1-249A8X', 'COPS', 'Rejected',
    49               TO_DATE ('3/5/2010 12:04:24', 'mm/dd/yyyy hh:mi:ss PM')
    50          FROM DUAL
    51        UNION ALL
    52        SELECT '1-249A8X', 'COPS', 'Rejected',
    53               TO_DATE ('3/16/2010 7:55:50', 'mm/dd/yyyy hh:mi:ss PM')
    54          FROM DUAL
    55        UNION ALL
    56        SELECT '1-249A8X', 'COPS', 'Rejected',
    57               TO_DATE ('3/16/2010 7:55:51', 'mm/dd/yyyy hh:mi:ss PM')
    58          FROM DUAL
    59        UNION ALL
    60        SELECT '1-249A8X', 'COPS', 'Validated',
    61               TO_DATE ('12/23/2009 3:37:54', 'mm/dd/yyyy hh:mi:ss PM')
    62          FROM DUAL
    63        UNION ALL
    64        SELECT '1-249A8X', 'COPS', 'Validated',
    65               TO_DATE ('12/23/2009 3:37:54', 'mm/dd/yyyy hh:mi:ss PM')
    66          FROM DUAL
    67        UNION ALL
    68        SELECT '1-249A8X', 'COPS', 'Validated',
    69               TO_DATE ('12/23/2009 3:37:54', 'mm/dd/yyyy hh:mi:ss PM')
    70          FROM DUAL
    71        UNION ALL
    72        SELECT '1-249A8X', 'D1', 'Ordered',
    73               TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM')
    74          FROM DUAL
    75        UNION ALL
    76        SELECT '1-249A8X', 'D1', 'Ordered',
    77               TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM')
    78          FROM DUAL
    79        UNION ALL
    80        SELECT '1-249A8X', 'D1', 'RFS',
    81               TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM')
    82          FROM DUAL
    83        UNION ALL
    84        SELECT '1-249A8X', 'D1', 'RFS',
    85               TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM')
    86          FROM DUAL
    87        UNION ALL
    88        SELECT '1-249A8X', 'D1', 'Validated',
    89               TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM')
    90          FROM DUAL
    91        UNION ALL
    92        SELECT '1-249A8X', 'D1', 'Validated',
    93               TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM')
    94          FROM DUAL
    95        UNION ALL
    96        SELECT '1-249A8Z', 'COPS', 'Validated',
    97               TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM')
    98          FROM DUAL
    99        UNION ALL
    100        SELECT '1-249A8Z', 'COPS', 'Ordered',
    101               TO_DATE ('3/26/2010 12:32:27', 'mm/dd/yyyy hh:mi:ss PM')
    102          FROM DUAL)
    103  select vt.quote_id,
    104         vt.account,
    105         vt.status,
    106         vt.captured_date,
    107         case when vt.rn = 1 then 'N'
    108              else 'Y'
    109         end deleted_flag
    110    from (SELECT quote_id, ACCOUNT, status, captured_date,
    111                 DENSE_RANK () OVER (PARTITION BY quote_id ORDER BY quote_id, ACCOUNT) rn
    112            FROM temp
    113          ORDER BY quote_id, captured_date) vt;
    QUOTE_ID ACCOUNT STATUS    CAPTURED_DATE DELETED_FLAG
    1-11TWQL D1      Rejected  23-Dec-2009 3 Y
    1-11TWQL D1      RFS       23-Dec-2009 3 Y
    1-11TWQL D1      Validated 23-Dec-2009 3 Y
    1-11TWQL D1      Ordered   23-Dec-2009 3 Y
    1-11TWQL COPS    RFS       23-Dec-2009 3 N
    1-11TWQL COPS    Validated 23-Dec-2009 3 N
    1-11TWQL COPS    Rejected  23-Dec-2009 3 N
    1-11TWQL COPS    Ordered   23-Dec-2009 3 N
    1-249A8X COPS    Validated 23-Dec-2009 3 N
    1-249A8X COPS    Validated 23-Dec-2009 3 N
    1-249A8X COPS    Validated 23-Dec-2009 3 N
    1-249A8X COPS    RFS       05-Mar-2010 1 N
    1-249A8X COPS    Rejected  05-Mar-2010 1 N
    1-249A8X COPS    RFS       16-Mar-2010 7 N
    1-249A8X COPS    Rejected  16-Mar-2010 7 N
    1-249A8X COPS    Rejected  16-Mar-2010 7 N
    1-249A8X COPS    RFS       16-Mar-2010 7 N
    1-249A8X D1      Ordered   26-Mar-2010 1 Y
    1-249A8X D1      Ordered   26-Mar-2010 1 Y
    1-249A8X D1      RFS       26-Mar-2010 1 Y
    1-249A8X D1      RFS       26-Mar-2010 1 Y
    1-249A8X D1      Validated 26-Mar-2010 1 Y
    1-249A8X D1      Validated 26-Mar-2010 1 Y
    1-249A8Z COPS    Validated 26-Mar-2010 1 N
    1-249A8Z COPS    Ordered   26-Mar-2010 1 N
    25 rows selected
    SQL>

  • Having trouble exporting mpeg2 files from FCP 3 - please help me!

    I haven't made a DVD for a little while, in the meantime have upgraded my operating system from 10.3 to 10.4 and am completely up to date with QT etc. I have Final Cut Pro 3, DVD Studio Pro 1.5 and Quicktime 7.3. The problem now is that when I try to export my edited video as mpeg2 from FCP, FCP immediately quits- I just can't figure it out... it leaves a file icon in the destination folder but apparently the error in the crash report means that I'm trying to write to a read only destination!?
    look! ->
    Exception: EXCBADACCESS (0x0001)
    Codes: KERNPROTECTIONFAILURE (0x0002) at 0x900b8c90
    and this->
    Thread 10 Crashed:
    0 com.apple.mpeg.QTMPEGExport 0x095e6634 SingleEntryPointInitialize + 52
    1 com.apple.mpeg.QTMPEGExport 0x095f828c MPEncode2__FP11CallbackRecP15EncodeParamsRec + 488
    2 com.apple.mpeg.QTMPEGExport 0x095f85b4 MPEncode__FP11CallbackRecP15EncodeParamsRec + 16
    3 com.apple.mpeg.QTMPEGExport 0x095e7fe8 DoIt__FP6FSSpecP11MovieRecordP19PixelToolsParameterlxP17CProgressReporter + 892
    4 com.apple.mpeg.QTMPEGExport 0x095e48ec QTtoMPEG2__FP6FSSpecP11MovieRecordP13ConvertParamsllP17CProgressReporter + 1048
    5 com.apple.mpeg.QTMPEGExport 0x095e297c EncodeMPEGandAIFF__FP15MPEGPrivGlobals + 1992
    6 com.apple.mpeg.QTMPEGExport 0x095e20f0 EncodingThread + 60
    7 ...ple.CoreServices.CarbonCore 0x90b6e0d8 InvokeThreadEntryUPP + 24
    8 ...ple.CoreServices.CarbonCore 0x90b6dcf8 CooperativeThread + 220
    9 libSystem.B.dylib 0x9002b200 pthreadbody + 96
    thanks for reading this far! anyway I've tried suggestions for similar sounding problems, they haven't worked - anybody
    got any ideas?

    Can you use DVDSP to do the encoding for you?
    FCP3 was really not intended to be run from Tiger, in fact, I believe it will not install on a clean 10.4 disk.
    x
    Do your part in supporting your fellow users. If a response has been Helpful to you or Solved your question, please mark it as such as an aid to other lost souls on the forum.
    Also, don't forget to mark the thread Answered when you get enough information to close the thread.

  • Please help me with SQL query...

    I need some help to figure out how to do this query...
    Here is the data:
    OriginalMessageID MessageID(PK) ExecDate
    1 1234 10:20
    1 5FE2 10:55
    1 EA33 10:50
    2 4667 11:10
    2 98EA 10:13
    Now I need the MessageID for the latest record for each OriginalMessageID,
    so the result would be:
    MessageID(PK)
    5FE2
    4667
    What would the SQL SELECT look like to get this result....
    Thanks
    Maximu

    select
    country.country,
    count(*) Totalpostspercountry,
    count(distinct post.user_id) Totaldistincuserspercountry,
    count(*)/count(distinct post.user_id) Avgpostsperuserbycountry
    from
    country, muser, post
    where country.location_id = muser.location_id
    and muser.user_id = post.user_id
    group by country.country
    The output is like this for your sample data - hope this is what you were looking for :)
    COUNTRY,TOTALPOSTSPERCOUNTRY,TOTALDISTINCUSERSPERCOUNTRY,AVGPOSTSPERUSERBYCOUNTRY
    England,1,1,1,
    Spain,5,2,2.5,

  • Please, help me with this query

    When running the SQL query below, It retrieves some lines that have the same ID_VAGA (ex. 386) but different ID_DETALHE_STATUS. in this case I want to retrieve only the line with the higher ID_DETALHE_STATUS that would be 1047. How can I do this in this SQL query ??
    This is the query:
    Select VAGAS.ID_VAGA, TITULOS_VAGAS.TIT_VAGA, VAGAS.QTDE_VAGAS, DETALHE_STATUS.ID_DETALHE_STATUS, DETALHE_STATUS.DETALHE_STATUS
    From VAGAS Inner Join TITULOS_VAGAS On TITULOS_VAGAS.ID_TIT_VAGA = VAGAS.TIT_VAGA Inner Join DETALHE_STATUS On VAGAS.ID_VAGA = DETALHE_STATUS.ID_VAGA
    Order By VAGAS.ID_VAGA
    And these are the results it's returning to me: But I want it to return only the higher ID_DETALHE_STATUS, that is 1047:
    ID_VAGA QTDE_VAGAS TIPO_VAGA VALOR_SALARIO TAXA_SELECAO TAXA_CANCEL UNIDADE ATIVO ID_DETALHE_STATUS DETALHE_STATUS
    386 1 Estagiario 500,00 70 0 1 1 1047 A5
    386 1 Estagiario 500,00 70 0 1 1 937 A2
    Thanks for reading.
    Roger.

    Hi,
    You can try this too:
    SELECT * FROM (
    Select VAGAS.ID_VAGA, TITULOS_VAGAS.TIT_VAGA, VAGAS.QTDE_VAGAS, DETALHE_STATUS.ID_DETALHE_STATUS, DETALHE_STATUS.DETALHE_STATUS
    From VAGAS
    Inner Join
    TITULOS_VAGAS On TITULOS_VAGAS.ID_TIT_VAGA = VAGAS.TIT_VAGA Inner Join DETALHE_STATUS On VAGAS.ID_VAGA = DETALHE_STATUS.ID_VAGA
    Order By VAGAS.ID_VAGA)
    WHERE DETALHE_STATUS.ID_DETALHE_STATUS>1047;Regards,
    Lakshmi.

  • How can i get all the records from three tables(not common records)

    Hi
    I have four base tables at R/3-Side. And i need to extract them from R/3-Side.
    And i dont have any standard extractor for these tables .
    If i create a 'View' on top of these tables. Then it will give only commom records among the three tables.
    But i want all the records from three base tables (not only common).
    So how can i get the all records from three tables. please let me know
    kumar

    You can create separate 3 datasources for three tables and extract data to BW. There you can implement business login to build relation between this data.

  • How to get large no of records from adf table

    Hi All,
    I'm working on adf.I'm using jdeveloper 11.1.1.5 version.In my adf application i have 1000 records in my adf table.I want to get the 500 selected records from that table at a time.But im not able to get huge number of records.How can i get the records from adf table.Please give me ur valuable suggestions.
    Thanks!

    Hi.
    for large record check the oficial doc.
    http://docs.oracle.com/cd/E24382_01/web.1112/e16182/bcadvvo.htm#CEGDBJEJ
    PAGE_RANGING is the best option for large tables.
    and these maybe will help you
    Re: Performance scrolling large ADF tables
    Re: Expert opinion needed: Best practices to handle huge rowsets on UI

  • Delete records from internal table

    hi all,
    i want to delete records from intenal table which are starting with a particular starting number .
    eg internal table
    10000
    20000
    90000
    91000
    92000
    88880
    i want delete the records starting with 9 i.e. 90000 91000 92000.
    Thanks in Adv
            RAJ

    You can test this piece of code.
    DATA:
    i_tab TYPE STANDARD TABLE OF mara,
    wa_tab TYPE mara.
    wa_tab-matnr = '1000'.
    APPEND wa_tab TO i_tab.
    CLEAR wa_tab.
    wa_tab-matnr = '1001'.
    APPEND wa_tab TO i_tab.
    CLEAR wa_tab.
    wa_tab-matnr = '1002'.
    APPEND wa_tab TO i_tab.
    CLEAR wa_tab.
    wa_tab-matnr = '1003'.
    APPEND wa_tab TO i_tab.
    CLEAR wa_tab.
    wa_tab-matnr = '2001'.
    APPEND wa_tab TO i_tab.
    CLEAR wa_tab.
    wa_tab-matnr = '3001'.
    APPEND wa_tab TO i_tab.
    CLEAR wa_tab.
    wa_tab-matnr = '4010'.
    APPEND wa_tab TO i_tab.
    CLEAR wa_tab.
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Aug 8, 2008 4:49 PM

Maybe you are looking for

  • Mess in Users folder - please help!!

    Hey My name is Fabrice, and the name of the man who previously owned the computer (PB G4, os X version 10.11 was called Pankaj. I tried to rename the admin (the one with a little house icon, I guess it's called the root?) in the "users" folder from P

  • What is new feature in Apple's new OS X Mountain Lion

    hello currently i have MA OSX  Hello i have just read some of feature of this new OS

  • Sql Loader - Parallel Direct Path Loading

    Hi, I want to load a few million records into a table. I read from OTN site that we can make use of Parallel Direct Loading Option. As given in the site, I split my source file into two and tried loading the file from two different sqlldr sessions si

  • SIMPLE JSP PROBLEM- HELP

    I have a jsp with which is created dynamically from a java class, now as I m navigating around I have few other pages with back button, now everytime I try the back button, the browser or my own, it keeps saying session timeout, and referesh the page

  • Need Lightroom 1 again!!

    I purchased the original Lightroom from Adobe when it first came out and have purchased upgrades since then. Apparently I have lost Lightroom 1 on my computer and it's screwing up the rest of my Lightroom versions. But Adobe only has versions 3-5 lis