Run Jobs One After Another

I know this is possible, I'm not sure how to go about it using Oracle's Scheduler. I simply want to create a special "queue" that I can submit jobs to which will run one after another. After they run, then then are gone. There many be no jobs at anyone time, and then at other times I may submit 10 jobs to the queue. Currently when I submit jobs they all run parrallel, this is not what I want. I guess I don't understand why Oracle calls it a Job Queue when all my jobs run in parrallel and not in a queue as the name implies.
This is not say that I don't have other jobs which I would not want to send to this "queue". In other cases I would just want to submit the job and let it run right away and not wait on anything.
I'm currently using the DBMS_JOB package, which I'm pretty sure won't let me do what I want.
Any help would be greatly appreciated.
Thanks,
Joe

Here is and example that creates Resource Manager objects and
two job classes that will permit 1 and 3 jobs to
run in parallel. Note this will work in 11R1 and 10.2.4
Assumes user user scott/tiger exists.
--  Remove existing scheduler objects, jobs and classes
CONNECT /  as sysdba
BEGIN
   DBMS_SCHEDULER.DROP_JOB_CLASS(
      JOB_CLASS_NAME => 'JOBQ_WIDTH_1_CLASS'
END;
BEGIN
   DBMS_SCHEDULER.DROP_JOB_CLASS(
      JOB_CLASS_NAME => 'JOBQ_WIDTH_3_CLASS'
END;
BEGIN
  FOR I IN 1..30 LOOP
  BEGIN
    SYS.DBMS_SCHEDULER.DROP_JOB(JOB_NAME => 'SCOTT.SERIAL_' || I, FORCE=>TRUE);
  EXCEPTION WHEN OTHERS THEN NULL;
  END;
END LOOP;
END;
BEGIN
  FOR I IN 1..90 LOOP
  BEGIN
    SYS.DBMS_SCHEDULER.DROP_JOB(JOB_NAME => 'SCOTT.PAR3_' || I, FORCE=>TRUE);
  EXCEPTION WHEN OTHERS THEN NULL;
  END;
END LOOP;
END;
ALTER SYSTEM SET RESOURCE_MANAGER_PLAN='';
set echo on
--  Remove previously defined  resource plan, resource plan
--  directives, and resource consumer groups  for this test
BEGIN
    -- Prepare the pending area
    DBMS_RESOURCE_MANAGER.CLEAR_PENDING_AREA;
    DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA;
    -- Delete resource plan, its resource plan directives, and
    -- any associated resource groups
    DBMS_RESOURCE_MANAGER.DELETE_PLAN_CASCADE(
       plan => 'JOBQS_PLAN'
    -- Submit the changes
    DBMS_RESOURCE_MANAGER.VALIDATE_PENDING_AREA;
    DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA;
END;
-- Create resource manager objects
BEGIN
   DBMS_RESOURCE_MANAGER.CLEAR_PENDING_AREA();
   DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA();
   DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP (
        CONSUMER_GROUP => 'JOBQ_WIDTH_1_GROUP',  
        COMMENT => 'Consumer group to force jobs to execute in serial'
   DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP (
        CONSUMER_GROUP => 'JOBQ_WIDTH_3_GROUP',  
        COMMENT => 'Consumer group to allow jobs to run in parallel 3'
   DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA();
END;
BEGIN
   DBMS_RESOURCE_MANAGER.CLEAR_PENDING_AREA();
   DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA();
   DBMS_RESOURCE_MANAGER.CREATE_PLAN
      ('JOBQS_PLAN', 'PLAN TO SUPPORT JOBQS');
   DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(
      PLAN => 'JOBQS_PLAN',
      GROUP_OR_SUBPLAN => 'JOBQ_WIDTH_1_GROUP',
      COMMENT=>'Associates with job class JOBQ_WIDTH_1_CLASS',
      CPU_P1 => 25,
      PARALLEL_DEGREE_LIMIT_P1 => 1,
      ACTIVE_SESS_POOL_P1 =>1
   DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(
      PLAN => 'JOBQS_PLAN',
      GROUP_OR_SUBPLAN => 'JOBQ_WIDTH_3_GROUP',
      COMMENT=>'Associates with job class JOBQ_WIDTH_3_CLASS',
      CPU_P1 => 75,
      PARALLEL_DEGREE_LIMIT_P1 => 2,
      ACTIVE_SESS_POOL_P1 =>3
   DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(
      PLAN => 'JOBQS_PLAN',
      GROUP_OR_SUBPLAN => 'OTHER_GROUPS',
      CPU_P1 => 0,
      CPU_P2 => 100,
      COMMENT=>'Required'
   DBMS_RESOURCE_MANAGER.VALIDATE_PENDING_AREA();
   DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA();
END;
-- Create scheduler classes
BEGIN
   DBMS_SCHEDULER.CREATE_JOB_CLASS(
      JOB_CLASS_NAME => 'JOBQ_WIDTH_1_CLASS',
      LOGGING_LEVEL => DBMS_SCHEDULER.LOGGING_FULL,
      LOG_HISTORY => 5,
      RESOURCE_CONSUMER_GROUP => 'JOBQ_WIDTH_1_GROUP',
      COMMENTS => 'Force jobs to run in serial, through plan JOBQ_PLAN and group JOBQ_WIDTH_1_GROUP'
END;
BEGIN
   DBMS_SCHEDULER.CREATE_JOB_CLASS(
      JOB_CLASS_NAME => 'JOBQ_WIDTH_3_CLASS',
      LOGGING_LEVEL => DBMS_SCHEDULER.LOGGING_FULL,
      LOG_HISTORY => 5,
      RESOURCE_CONSUMER_GROUP => 'JOBQ_WIDTH_3_GROUP',
      COMMENTS => 'Allow up to 3 jobs in parallel, enforced by plan JOBQ_PLAN and group JOBQ_WIDTH_3_GROUP'
END;
connect / as sysdba
grant execute on jobq_width_1_class to scott;
grant execute on jobq_width_3_class to scott;
begin
  dbms_resource_manager_privs.grant_switch_consumer_group('scott','JOBQ_WIDTH_1_GROUP',false);
  dbms_resource_manager_privs.grant_switch_consumer_group('scott','JOBQ_WIDTH_3_GROUP',false);
end;
alter system set resource_manager_plan='';
connect scott/tiger
begin
  for i in 1..30 loop
  sys.dbms_scheduler.create_job(job_name => 'scott.serial_' || i,
      job_type=>'plsql_block', job_action=>'dbms_lock.sleep(2);',
      job_class=>'jobq_width_1_class',
      enabled=>true);
  end loop;
end;
begin
  for i in 1..90 loop
  sys.dbms_scheduler.create_job(job_name => 'scott.par3_' || i,
      job_type=>'plsql_block', job_action=>'dbms_lock.sleep(2);',
      job_class=>'jobq_width_3_class',
      enabled=>true);
  end loop;
end;
/-- The par3_90 job should finish about the same time as the serial_30 job since
-- we run 3 jobs in paralled and serial respectively.
-- check user_scheduler_job_run_details for after the test completed to verify.

Similar Messages

  • Auto schudule sm37 jobs - one after another

    Dear all,
    my doubt was explained in the below..
    Assume In sm37, I'm having 3  jobs named as X, Y & Z  it will run daily basis..
    Consider X will start at 1am, Y at 2am & Z at 3am.
    X will release one background  job once it get successfully completed. Dynamically it will assigned the background job name of X.(Ex .X started 1am &  released  the job at 01:01:00 so job name dynamically assigned as JOB_X_20111105_010100 - as per time stamp)
    the same concept of other jobs (Y & Z)
    we schedule 3 jobs at given  time, but Job X started and released the background job, it completed 1:30am. so next job Y will start at 2:00am only.
    i want to fulfill the gap of half an hour.
    so my question is first i trigger a job X. Y will be waiting for the Job X completion. once X getting completed(X background job), job Y will start to release their background job like that.
    Hope it was clear.. Provide me some idea's..
    Regards,
    Vasanth S

    Dear Subhankar Garani,
    I want to wait upto the X background job completion. then Start Y...
    Regards,
    Vasanth

  • QT Playlist, or Run movies one afther another in same window maybe?

    What am i missing here?
    Is it possible that QT can't open and run more movies and play it one after another in the same window?
    Let's say if i dont want to use VLC or any other player, or PlayList plug inn's etc... (they are ugly ) and want to go to my movies, select two new movie trailers, want to show it, par example, to friend, and clik "open" ,"open with QT" or cmnd+O, whatsoever...but what happens? I get 2 movie windows on desktop. But i want to watch one (or many as i want) trailers after another, and got less desktop space used... :S
    Hm, is this some weird Apple principle, or what?
    What solutions do you guys use?
    FrontRow looks like goodone but i got PPC G4 iMac, and i wont buy new one just for that!

    This is beyond anything I have ever tried. But I think I know what you have in mind, and you should be able to do it using JavaScript. I did it with still images on this page:
    http://capital2.capital.edu/admin-staff/dalthoff/adventures/tr2005/ohfair2.html
    You would need to give the movie container a name so that you can access it from JavaScript, and you have the added problem of needing to control the QuickTime object from JavaScript. Have a look at the QuickTime JavaScript API; it might be helpful:
    http://developer.apple.com/documentation/quicktime/Conceptual/QTScripting_JavaSc ript/index.html
    In spite of the code on that gallery page I linked above, I really don't speak JavaScript, and I barely understand how my own code works. But I think JavaScript will allow you to do what you want to do, and you can probably even write a custom controller for the movie right into your web page.
    --Dave Althoff, Jr.

  • Displaying images in canvas one after another

    Hi all,
    I have a problem displaying images in canvas one after another. I am using for loop and when i run the application, all images run back in the and only finally only the last image gets displayed in the emulator. I also used thread.sleep(). But it din't work.
    Here is my code:
    // A canvas that illustrates image drawing
    class DrawImageCanvas extends Canvas
    Image image;
    public void paint(Graphics g)
    int width = getWidth();
    int height = getHeight();
    g.setColor(0);
    g.fillRect(0, 0, width, height);
    String images[]={"paint_2.PNG","radha.PNG","cute.png","design.png","flowers.png"};
    for(int i=0;i<images.length;i++)
    image = null;
    System.out.println("/"+images);
         try
         image = Image.createImage("/"+images[i]);
    catch (IOException ex)
    System.out.println(ex);
    g.setColor(0xffffff);
    g.drawString("Failed to load image!", 0, 0, Graphics.TOP | Graphics.LEFT);
    return;
    if (image != null)
    g.drawImage(image, width/2, height/2, Graphics.VCENTER | Graphics.HCENTER);
    try
    Thread.sleep(5000);
    catch(Exception ex)
         System.out.println("the exception is.."+ex);
    Help me and Thanks in advance.

    See the code below : prefer the use of a Timer and a TimerTask instead of Thread.sleep().
    showNotify (from Canvas) is used to launch the timer.
    import java.io.IOException;
    import java.util.Timer;
    import java.util.TimerTask;
    import javax.microedition.lcdui.Canvas;
    import javax.microedition.lcdui.Graphics;
    import javax.microedition.lcdui.Image;
    public class DrawImage extends Canvas {
        Image image;
        String images[] = {"img1.png", "img2.png", "img3.png", "img4.png", "img5.png",
                            "img6.png", "img7.png"};
        Image[] tabImage;
        int imageCounter = 0;
        public DrawImage(){
            try {
                tabImage = new Image[images.length];
                for (int i = 0; i < images.length; i++)
                    tabImage[i] = Image.createImage("/" + images);
    } catch (IOException ex) {
    ex.printStackTrace();
    public void paint(Graphics g) {
    int width = getWidth();
    int height = getHeight();
    g.setColor(0);
    g.fillRect(0, 0, width, height);
    image = tabImage[imageCounter];
    if (image != null)
    g.drawImage(image, width / 2, height / 2, Graphics.VCENTER | Graphics.HCENTER);
    else{
    System.out.println("null");
    g.setColor(0xffffff);
    g.drawString("Failed to load image!", 0, 0, Graphics.TOP | Graphics.LEFT);
    protected void showNotify(){
    Timer t = new Timer();
    t.schedule(new PhotoSwitcher(), 5000, 5000);
    private class PhotoSwitcher extends TimerTask{
    public void run() {
    if (imageCounter < images.length - 1)
    imageCounter++;
    else
    imageCounter = 0;
    repaint();
    I hope this will help you !
    fetchy.
    Edited by: fetchy on 14 ao�t 2008 09:48                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • JMF Play files in a sequence one after another

    Hi
    i developed a JMF based player for playing more than one files in a sequence one after another.
    problem is that it playes all files at same time.
    it should run 2nd file when one file is completed.

    I think time period or state of media will be helpful

  • When I try and open Microsoft Word 2011 documents they start opening one after another at a rapid speed and I can't stop it. I reboot and same thing happens?

    When I try and open Microsoft Word 2011 documents on my  IMAC they start opening one after another at a rapid speed and I can't stop it. I reboot and same thing happens. The documents open in rapid succession on their own and don't stop until I force close or after maybe 100 or more open I start getting the following message for each document attemting to open "This document could not be registered. It will not be possible to create links from other documents to this document" and then in paretheses the name of the document. After I click okay another trys to open. Any suggestions?

    If you had multiple documents open and quit the app without closing all of the docs first, it will open them again when you launch the app. Open Word, and then close all the documents, you may be asked to save the document, if the document was already saved but you made changes to it before you quit the app, you may need to save the changes first, shorcut ( command and s keys). After you close all of the documents then quit the app and restart the computer. See if this works.

  • Playing movies in Front Row one after another automatically?

    I have a number of short video clips that I can watch with Front Row. However, every time a clip ends, I have to go and click “play” on the next clip and this is annoying. I am wondering if there is a way to make movies play one after another without stopping. Thanks for the help!

    David,
    Thanks for the help. I'm still thinking there must be SOME way to pull this off. It seems like Mac's can do just about anything if you take the time to figure it out. Why wouldn't the people who designed Front Row not add this feature? It doesn't make any sense. There has to be a way. Anybody else have any ideas?

  • How do i play two sound file one after another

    Hi All,
    How do i play two sound file one after another using single AudioClip Component?.
    Advance in thanks
    Manivel

    AudioClip gives you very little control over what happens to the sound, it also isn't capable of playing long clips or waiting until a clip ends. It will play multiple clips over top of each other.
    To do what you want you should use the facilities of javax.sound. Here's a post with an example: http://forum.java.sun.com/thread.jspa?forumID=513&threadID=450768
    There is also a tutorial, but its example fails for long clips.

  • One after another

    Hello,
    SQL> with my_table as
      2             (
      3            select 'M082012' pera, to_number(10584338) snr, to_number(10) pnr, 'Beule' name, 'Anna' f_name from dual union all
      4            select 'M092012' pera, to_number(15965177) snr, to_number(15) pnr, 'Tester' name, 'Toni' f_name from dual union all
      5            select 'M082012' pera, to_number(14254501) snr, to_number(20) pnr, 'Wallen' name, 'Monika' f_name from dual union all
      6            select 'M012013' pera, to_number(14254505) snr, to_number(15) pnr, 'Wallen' name, 'Monika' f_name from dual union all
      7            select 'M012013' pera, to_number(14254506) snr, to_number(15) pnr, 'Wallen' name, 'Monika' f_name from dual union all
      8            select 'M082012' pera, to_number(10584339) snr, to_number(10) pnr, 'Beule' name, 'Anna' f_name from dual union all
      9            select 'M092012' pera, to_number(15965178) snr, to_number(10) pnr, 'Beule' name, 'Anna' f_name from dual union all
    10            select 'M012013' pera, to_number(10674833) snr, to_number(15) pnr, 'Tester' name, 'Toni' f_name from dual union all
    11            select 'M012013' pera, to_number(10674834) snr, to_number(15) pnr, 'Tester' name, 'Toni' f_name from dual union all
    12            select 'M082012' pera, to_number(10674835) snr, to_number(15) pnr, 'Tester' name, 'Toni' f_name from dual union all
    13           select 'M012013' pera, to_number(10539210) snr, to_number(30) pnr, 'Klose' name, 'Werner' f_name from dual union all
    14           select 'M012013' pera, to_number(12345678) snr, to_number(50) pnr, 'Meier' name, 'Otto' f_name from dual union all
    15           select 'M012013' pera, to_number(22345789) snr, to_number(50) pnr, 'Meier' name, 'Otto' f_name from dual union all
    16           select 'M082012' pera, to_number(10584346) snr, to_number(77) pnr, 'Carl' name, 'Frank' f_name from dual union all
    17           select 'M062012' pera, to_number(10550971) snr, to_number(77) pnr, 'Carl' name, 'Frank' f_name from dual union all
    18           select 'M092012' pera, to_number(15965185) snr, to_number(77) pnr, 'Carl' name, 'Frank' f_name from dual union all
    19           select 'M082012' pera, to_number(10584352) snr, to_number(50) pnr, 'Meier' name, 'Otto' f_name from dual union all
    20           select 'M092012' pera, to_number(15965191) snr, to_number(80) pnr, 'Duster' name, 'Hucke' f_name from dual)
    21       select case when pera = 'M012013' and rn3 = 1 then '*' end mark,
    22              pera,
    23              snr,
    24              pnr,
    25              name,
    26              f_name,
    27              case when pera = 'M012013' and rn3 = 1 then snr end mark_snr
    28         from (select pera, snr, pnr, name, f_name,
    29                      row_number() over (partition by pera, pnr, snr, name, f_name order by pnr, name) rn,
    30                      row_number() over (partition by pera, name, f_name order by pnr) rn3
    31                 from (select pera, snr, pnr, name, f_name,
    32                              max(case when pera = 'M012013' then 'Y' end)
    33                              over(partition by upper(name||f_name)) m_flag,
    34                              count(*) over(partition by upper(name||f_name)) cnt
    35                         from my_table)
    36                        where m_flag = 'Y'
    37                          and cnt > 1
    38                order by 4,5,6, to_number(substr(pera,4,4)||substr(pera,2,2)) desc)
    39       order by 4,5,6, to_number(substr(pera,4,4)||substr(pera,2,2)) desc,3
    40  /
    M PERA           SNR        PNR NAME   F_NAME   MARK_SNR
    * M012013   10674833         15 Tester Toni     10674833
      M012013   10674834         15 Tester Toni
      M092012   15965177         15 Tester Toni
      M082012   10674835         15 Tester Toni
    * M012013   14254505         15 Wallen Monika   14254505
      M012013   14254506         15 Wallen Monika
      M082012   14254501         20 Wallen Monika
    * M012013   12345678         50 Meier  Otto     12345678
      M012013   22345789         50 Meier  Otto
      M082012   10584352         50 Meier  Otto
    10 Zeilen ausgewählt.
    SQL>
    SQL> I would like to get the SNR column values one after another in MARK_SNR Column.
    It is possible to get the following output with a sql statement???
    M PERA           SNR        PNR NAME   F_NAME   MARK_SNR
    * M012013   10674833         15 Tester Toni     10674833, 10674834, 15965177, 10674835
    * M012013   14254505         15 Wallen Monika   14254505, 14254506, 14254501
    * M012013   12345678         50 Meier  Otto     12345678, 22345789, 10584352

    Try this:
    WITH my_table AS
            (SELECT 'M082012' pera,
                    TO_NUMBER (10584338) snr,
                    TO_NUMBER (10) pnr,
                    'Beule' name,
                    'Anna' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M092012' pera,
                    TO_NUMBER (15965177) snr,
                    TO_NUMBER (15) pnr,
                    'Tester' name,
                    'Toni' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M082012' pera,
                    TO_NUMBER (14254501) snr,
                    TO_NUMBER (20) pnr,
                    'Wallen' name,
                    'Monika' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M012013' pera,
                    TO_NUMBER (14254505) snr,
                    TO_NUMBER (15) pnr,
                    'Wallen' name,
                    'Monika' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M012013' pera,
                    TO_NUMBER (14254506) snr,
                    TO_NUMBER (15) pnr,
                    'Wallen' name,
                    'Monika' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M082012' pera,
                    TO_NUMBER (10584339) snr,
                    TO_NUMBER (10) pnr,
                    'Beule' name,
                    'Anna' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M092012' pera,
                    TO_NUMBER (15965178) snr,
                    TO_NUMBER (10) pnr,
                    'Beule' name,
                    'Anna' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M012013' pera,
                    TO_NUMBER (10674833) snr,
                    TO_NUMBER (15) pnr,
                    'Tester' name,
                    'Toni' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M012013' pera,
                    TO_NUMBER (10674834) snr,
                    TO_NUMBER (15) pnr,
                    'Tester' name,
                    'Toni' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M082012' pera,
                    TO_NUMBER (10674835) snr,
                    TO_NUMBER (15) pnr,
                    'Tester' name,
                    'Toni' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M012013' pera,
                    TO_NUMBER (10539210) snr,
                    TO_NUMBER (30) pnr,
                    'Klose' name,
                    'Werner' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M012013' pera,
                    TO_NUMBER (12345678) snr,
                    TO_NUMBER (50) pnr,
                    'Meier' name,
                    'Otto' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M012013' pera,
                    TO_NUMBER (22345789) snr,
                    TO_NUMBER (50) pnr,
                    'Meier' name,
                    'Otto' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M082012' pera,
                    TO_NUMBER (10584346) snr,
                    TO_NUMBER (77) pnr,
                    'Carl' name,
                    'Frank' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M062012' pera,
                    TO_NUMBER (10550971) snr,
                    TO_NUMBER (77) pnr,
                    'Carl' name,
                    'Frank' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M092012' pera,
                    TO_NUMBER (15965185) snr,
                    TO_NUMBER (77) pnr,
                    'Carl' name,
                    'Frank' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M082012' pera,
                    TO_NUMBER (10584352) snr,
                    TO_NUMBER (50) pnr,
                    'Meier' name,
                    'Otto' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M092012' pera,
                    TO_NUMBER (15965191) snr,
                    TO_NUMBER (80) pnr,
                    'Duster' name,
                    'Hucke' f_name
               FROM DUAL),
         t AS
            (  SELECT CASE WHEN pera = 'M012013' AND rn3 = 1 THEN '*' END mark,
                      pera,
                      snr,
                      pnr,
                      name,
                      f_name,
                      CASE WHEN pera = 'M012013' AND rn3 = 1 THEN snr END mark_snr
                 FROM (  SELECT pera,
                                snr,
                                pnr,
                                name,
                                f_name,
                                ROW_NUMBER ()
                                OVER (PARTITION BY pera, pnr, snr, name, f_name
                                      ORDER BY pnr, name)
                                   rn,
                                ROW_NUMBER ()
                                OVER (PARTITION BY pera, name, f_name ORDER BY pnr)
                                   rn3
                           FROM (SELECT pera,
                                        snr,
                                        pnr,
                                        name,
                                        f_name,
                                        MAX (CASE WHEN pera = 'M012013' THEN 'Y' END)
                                           OVER (PARTITION BY UPPER (name || f_name))
                                           m_flag,
                                        COUNT (*)
                                           OVER (PARTITION BY UPPER (name || f_name))
                                           cnt
                                   FROM my_table)
                          WHERE m_flag = 'Y' AND cnt > 1
                       ORDER BY 4,
                                5,
                                6,
                                TO_NUMBER (
                                   SUBSTR (pera, 4, 4) || SUBSTR (pera, 2, 2)) DESC)
             ORDER BY 4,
                      5,
                      6,
                      TO_NUMBER (SUBSTR (pera, 4, 4) || SUBSTR (pera, 2, 2)) DESC,
                      3)
    SELECT *
      FROM (SELECT MARK,
                   PERA,
                   SNR,
                   PNR,
                   NAME,
                   a.F_NAME,
                   CASE
                      WHEN mark = '*' THEN
                            MARK_SNR
                         || ','
                         || SUBSTR (b.str, INSTR (b.str, ',', 1) + 1)
                   END
                      mark_snr
              FROM t a,
                   (  SELECT f_name,
                             listagg (SNR, ',') WITHIN GROUP (ORDER BY pera) str
                        FROM t
                    GROUP BY f_name) b
             WHERE a.f_name = b.f_name)
    WHERE mark_snr IS NOT NULL;OUTPUT:
    MARK     PERA     SNR     PNR     NAME     F_NAME     MARK_SNR
    *     M012013     10674833     15     Tester     Toni     10674833,10674834,10674835,15965177
    *     M012013     14254505     15     Wallen     Monika     14254505,14254506,14254501
    *     M012013     12345678     50     Meier     Otto     12345678,22345789,10584352Cheers,
    Manik.

  • How to play two presentations from the DMP one after another and looping

    Can anyone help me on this.I want to play two presenations one after another and looping from the DMP.

    Semuhtu,
    The easiest solution for looping two or more DMD presentations
    is to create a nested playlist within DMD.  You simply
    create a master presentation and add a playlist to this
    presentation.  Add the desired presentations to this playlist
    and then schedule or send the Action to the DMP(s) to play
    the Master Presentation.  The 2 or more child presentations will
    play and loop until you stop it manually.
    Summary of Tasks
    * Using DMD create Presentations (2 or more) that you would like
      to display on the DMP-Display(s).
    * After the presentations are created, you will need to find out
      what the URL addresses are for each presentation. Using the
      "Actions" drop down on the DMM-DMP Manager screen, you select
      a DMP and send the Presentation to the DMP.  Once the DMP displays
      the presentation, access the DMP-DM Web admin page and copy the URL
      address in the "Startup URLs-->Browser" field.   Repeat this process
      for each DMD presentation that you want to loop.
      For example:
      http://dmm.company.com:8080/xTAS-core/appgen/clad/clad_95_.htm
      http://dmm.company.com:8080/xTAS-core/appgen/clad/clad_96_.htm
      and so on...
    * Another parameter or variable that you will need to find out is
      the duration of your DMD presentation(s).  Some Presentations may be
      a slideshow of images and some may contain videos.  Your will need to
      play each presentation on the DMP to determine the duration length of
      each presentation that you will add to the looped playlist. 
    * Create a Master presentation using DMD. In this presentation, you will
      create add a "Playlist" to the presentation by selecting the Playlist
      button-drop down.  Select "All Media Types" and a Playlist object will
      be added to the Master presentation.
      - Double-click on the object to add content
      - Select "Add URL" button in the Playlist Content window.
      - Fill in the required fields (URL Title & Link) in the "Add URL"
        window.  Repeat the process for each presentation that you want
        to add.
      - Set the Duration for each item in the Playlist. Select the Item
        in the list and then DOUBLE-CLICK on the "Planned Duration"
        field and edit the time to desired duration.  Repeat process for
        each item.
      - Save Master Presentation
    * Schedule or use the  "Actions" drop down on the DMM-DMP Manager screen
      send the Master Presentation to the DMP(s).  The Playlist will play and
      Loop after the last item in the Master Playlist.
    If this answers your question, Please take time to mark this
    discussion answered & rate the response.
    Thank You!
    T.

  • Invoking 2 SQL statements one after another?

    Hi,
    Is it a good idea to invoke to 2 SQL statements one after another using the same connection & statement object? Some thing like this:-
    method(){
    String insertSql="insert into employee(Name,Age)values(?,?);
    Connection conn=null;
    PreparedStatement pst=null;
    int insertRows=0;
    ResultSet rs=null;
    try{
    conn=getConnection(); //will get the connection object
    if(insertRows==0){
    pst=conn.preparedStatement(insertSql);
    pst.setString(1,"Jason");
    pst.setString(2,"30");
    insertRows=pst.executeUpdate();
    conn.commit();
    if(insertRows>0) {
    pst=conn.createStatement("select * from employee");
    //retrieving the data from the same table
    rs=pst.executeQuery();
    while(rs.next()){
    System.out.println("The name is::"+rs.getString(1)+ " "+rs.getString(2));
    }catch(Exception e){
    }finally{
    try{
    if(pst != null) {
    pst.close();
    pst = null;
    if(rs != null) {
    rs.close();
    rs = null;
    if(conn != null) {
    conn.close();
    conn = null;
    }catch(Exception e) {
    e.printStackTrace();
    Here one more thing is that i want the insertSQL statement to be invoked only once that is in the beginning and the next time the method() is called it should skip the insert block and should only retrieve the data using "select * from employee". How to do it? I tried with few options nothing works.. Please do provide a solution for this... It is really urgent.
    Thanks

    Is it a good idea to invoke to 2 SQL statements one after another using the same connection & statement object? I think what you're asking is if you need a new Connection and/or Statement object for every query. The answer is no. In fact, most applications pool Connections so literally thousands or millions of queries are done in the lifetime of a Connection. You can reuse Statements and PreparedStatements as well as long as you intend on executing the same query.

  • Songs Skip Forward One After Another/Sporadic and Out of Nowhere

    I have an older IPOD 40g that skips through songs, one after another, without playing anything, and seems to do it in any mode, especially in overall Shuffle mode. I have the "shuffle Songs" feature on, but other than that, it has a pretty standard set up.
    I have restored to the defaults, last week, and it started doing the wierd stuff again today.
    Sometimes I have a hard time getting it to unfreeze and reset as well.
    I appreciate any help.

    Have you tried Party Shuffle? If you control click on a track, you can choose "Play Next In Party Shuffle". I often listen the way you're describing. I start listening in Party Shuffle (which I have set to select from a specific playlist). When I am reminded of another song, I select the song and then choose Play Next in Party Shuffle. And so on.
    As for your second question, you could try moving your entire short playlist into Party Shuffle. Once that playlist was done, Party Shuffle would revert to it's normal selection criteria (you could set it to pull from your entire library or a specific playlist). Music would keep playing.
    Can you tell I like Party Shuffle?

  • View photos one after another

    I want to be able to go to a tag section and view the photos one after another.  Using Adobe 9 pre and pse.

    Hi,
    I did not completely understand your workflow. Can you please elaborate a bit more?
    Thanks
    Andaleeb

  • How can I make my movies to play one after another automatically?

    I couldn't find the settings to play all my movies one after another.
    Any idea?

    Given the number of threads bemoaning the lack of such features (mostly for music videos) and countless enhancement requests sent here:
    http://www.apple.com/feedback/appletv.html
    ..and the lack of the facility being added in over a year make me think it's unlikely to ever happen but I'd love ot be proved wrong!
    AC

  • Execute functions one after another

    I would like to make a function that could execute other
    functions
    execute the one after another - in a manner that the next
    function is executed only after the one before has finished its
    task
    I have been thinking about how to achieve this but haven`t
    come up with anything good.
    If you have any ideas please share
    Thanks in advance

    hey,
    what you want to is no problem at all. you just need to have
    conditional statements within your main function that tell it when
    to execute your other functions.
    here is an example:

Maybe you are looking for