Please Help: Trouble with nested CASE statement and comparing dates

Please tell me why the query below is always returning the bold null even when the start_date of OLD is greater than or equal to the start_date of NEW.
What I want to do is get the difference of the start_dates of two statuses ( Start_date of OLD - Start_date of NEW) if
1. end_date of NEW is not null
2. start_date of OLD is greater than start_date of NEW
else return null.
select id,
case when max(end_date) keep (dense_rank last order by decode(request_wflow_status,'New',1,0),start_date) is null then
null
else
          case when max(decode(status,'OLD',start_date,null)) > max(decode(status,'NEW',start_date,null))
          then max(decode(status,'OLD',start_date,null)) - max(decode(status,'NEW',start_date,null))
else
null
end
end result
from cc_request_status where id =1
group by id;

Avinash,
Thank you for your help.. Here is a more description of my problem..
Here is a sample of data I have for a table with four columns (id,status,start_date,end_date)
What I need to do is to get difference of the start dates of the maximum available dates, if data is valid. The pseducode is as follows:
IF end_date of New status is null
THEN return null
ELSE
IF start_date of old >= start_date of new
THEN return (start_date of old - start_date of new)
ELSE return null
I used the following query but always return the bold null
select id,
(case when max(end_date) keep (dense_rank last order by decode(status,'new',1,0),start_date) is null then
null
else
          (case when max(decode(status,'old',start_date,null)) >=
          max(decode(status,'new',start_date,null))
          then max(decode(status,'old',start_date,null)) - max(decode(status,'new',start_date,null))
else
null
end)
end) result
from tbl where id =1
Based on the below sample, I expected to get the following result; 14-Mar-07 - 16-Feb-07 which is the difference of the maximum start_dates of the two statuses. However the query is not working.. Please help me.. Thank you..
Id    Status    start_date      end_date
1     new      03-Feb-07      07-Feb-07
1     new      16-Feb-07      21-Feb-07
1     old      '10-Mar-07      12-Mar-07
1     old      '14-Mar-07      16-Mar-07

Similar Messages

  • Having Trouble with nested Case Statements

    Hi Folks,
    I'm having trouble getting my head round nested case statements. For the life of me I cannot see what I'm missing here (unless my approach is all wrong).
    Any help much appreciated.
    Script:
    set serveroutput on format wrapped
    set feedback off
    set linesize 150
    DECLARE
    /* Set supported version here */
    ora_version VARCHAR2(4);
    unsupp_version EXCEPTION;
    /* Archive Log Info */
    db_log_mode VARCHAR2(12);
    BEGIN
    SELECT SUBSTR(VERSION, 1, 4)
    INTO ora_version
    FROM v$instance;
    SELECT log_mode
    INTO db_log_mode
    FROM v$database;
    CASE
    WHEN ora_version = '10.2' THEN
    DECLARE
    TYPE t_db IS RECORD(
    dflsh VARCHAR2(3),
    dcscn NUMBER);
    v_db t_db;
    BEGIN
    CASE
    WHEN db_log_mode = 'ARCHIVELOG' THEN
    EXECUTE IMMEDIATE 'SELECT INITCAP(flashback_on), current_scn FROM v$database'
    INTO v_db;
    DBMS_OUTPUT.PUT_LINE(' Flashback On : ' || v_db.dflsh);
    DBMS_OUTPUT.PUT_LINE(' Current SCN : ' || v_db.dcscn);
    DBMS_OUTPUT.PUT_LINE(' Log Mode : ' || db_log_mode);
    DBMS_OUTPUT.PUT_LINE(' Version : ' || ora_version);
    END;
    ELSE
    DBMS_OUTPUT.PUT_LINE(' Log Mode : ' || db_log_mode);
    DBMS_OUTPUT.PUT_LINE(' Version : ' || ora_version);
    END CASE;
    END;
    WHEN ora_version = '9.2' THEN
    DECLARE
    TYPE t_db IS RECORD(
    dcscn NUMBER);
    v_db t_db;
    BEGIN
    CASE
    WHEN db_log_mode = 'ARCHIVELOG' THEN
    EXECUTE IMMEDIATE 'SELECT current_scn FROM v$database'
    INTO v_db;
    DBMS_OUTPUT.PUT_LINE(' Current SCN : ' || v_db.dcscn);
    DBMS_OUTPUT.PUT_LINE(' Log Mode : ' || db_log_mode);
    DBMS_OUTPUT.PUT_LINE(' Version : ' || ora_version);
    END;
    ELSE
    DBMS_OUTPUT.PUT_LINE(' Log Mode : ' || db_log_mode);
    DBMS_OUTPUT.PUT_LINE(' Version : ' || ora_version);
    END CASE;
    END;
    ELSE
    RAISE unsupp_version;
    END CASE;
    EXCEPTION
    WHEN unsupp_version THEN
    DBMS_OUTPUT.PUT_LINE('');
    DBMS_OUTPUT.PUT_LINE(' Unsupported Version '||ora_version||' !');
    DBMS_OUTPUT.PUT_LINE('');
    END;
    set linesize 80
    set feedback on
    set serveroutput off
    Gives errors:
    END;
    ERROR at line 31:
    ORA-06550: line 31, column 7:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
    case
    ORA-06550: line 37, column 1:
    PLS-00103: Encountered the symbol "WHEN"
    ORA-06550: line 50, column 28:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
    case
    Edited by: milkyjoe on 28-Apr-2010 05:38

    Hi,
    Never write, much less post, unformatted code.
    Indent the code to show the extent of multi-line structures like BEGIN and CASE.
    For example:
    DECLARE
         /* Set supported version here */
         ora_version       VARCHAR2 (4);
         unsupp_version       EXCEPTION;
         /* Archive Log Info */
         db_log_mode      VARCHAR2 (12);
    BEGIN
         SELECT     SUBSTR(VERSION, 1, 4)
         INTO     ora_version
         FROM     v$instance;
         SELECT     log_mode
         INTO     db_log_mode
         FROM     v$database;
         CASE
             WHEN  ora_version = '10.2' THEN
              DECLARE
                  TYPE t_db IS RECORD(
                             dflsh     VARCHAR2(3),
                             dcscn      NUMBER);
                  v_db t_db;
              BEGIN
                  CASE
                      WHEN db_log_mode = 'ARCHIVELOG' THEN
                       EXECUTE IMMEDIATE 'SELECT INITCAP(flashback_on), current_scn FROM v$database'
                                           INTO v_db;
                       DBMS_OUTPUT.PUT_LINE(' Flashback On : ' || v_db.dflsh);
                       DBMS_OUTPUT.PUT_LINE(' Current SCN : ' || v_db.dcscn);
                       DBMS_OUTPUT.PUT_LINE(' Log Mode : ' || db_log_mode);
                       DBMS_OUTPUT.PUT_LINE(' Version : ' || ora_version);
                  END;
    ...The code above is what you posted, with some whitespace added.
    The error is much clearer; the last CASE statement concludes with END, but CASE blocks always have to conclude with END CASE .
    Why are you using a nested BEGIN block in the code above? Are you plannning to add an EXCEPTION handler later?
    When posting formatted text on this site, type these 6 characters:
    \(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Please help me with centering a component and clearing a JRadioButton

    Hi, could someone help me to cener the label and clear the selected JRadioButton?
    I have put a comment beside the problematic place. Thanks a lot! ann
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.*;
    public class ButtonAction extends JPanel implements ActionListener {
         private JRadioButton button1, button2;
         private JButton send, clear;
         private JTextField text;
         private JLabel label;
         private ButtonGroup group;
         public ButtonAction() {
              setPreferredSize(new Dimension(300, 200));
              setLayout(new GridLayout(0, 1, 5, 5));
            setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
            setBorder(BorderFactory.createLineBorder(Color.blue));
            JPanel p1 = new JPanel();
            button1 = new JRadioButton("Button One");
              button2 = new JRadioButton("Button Two");
              group = new ButtonGroup();
              group.add(button1);
              group.add(button2);
              p1.add(button1);
              p1.add(button2);
              JPanel p2 = new JPanel();
              send = new JButton("Send");
              clear = new JButton("Clear");
              label = new JLabel(" ");
              label.setAlignmentX(Component.CENTER_ALIGNMENT);    //this doesn't work
              send.addActionListener(this);
              clear.addActionListener(this);
              p2.add(send);p2.add(clear);
              add(p1); add(p2); add(label);
         public void DisplayGUI(){
              JFrame frame = new JFrame();
              frame.getContentPane().add(this);
              frame.pack();
              frame.setVisible(true);
         public String getButton(){
              String result = "";
              if (button1.isSelected())
                   result += "\t You have clicked the first button";
              else if (button2.isSelected())
                   result += "\t You have clicked the second button";
              return result;
         public void setButton(){                  // this method doesn't work
              if (button1.isSelected() == true)
                   button1.setSelected(false);
              else if (button2.isSelected() == true)
                   button2.setSelected(false);
         public void actionPerformed (ActionEvent e) {
              if (e.getSource() == send) {
                   label.setText(getButton());
              else if (e.getSource() == clear) {
                   setButton();
                   label.setText("no button is selected");
         public static void main(String[] args) {
              ButtonAction ba = new ButtonAction();
              ba.DisplayGUI();
    }

    setHorizontalAlignmentX(Component.CENTER_ALIGNMENT) is a container method and I don't think it does what you think. Try this instead:label = new JLabel("Some text");
    //label.setHorizontalAlignmentX(Component.CENTER_ALIGNMENT);    //this doesn't work
    label.setHorizontalAlignment(SwingConstants.CENTER);When you alter the state of a radio button you should probably use the group methods - because the group "coordinates" the state of the buttons as a whole. Note that setSelection() isn't quite like a user click in that it doesn't fire a method. Now, in your case you are essentially clearing the selection of the group and ButtonGroup provides a method for that.     public void setButton(){                  // this method doesn't work
        if (button1.isSelected() == true)
        button1.setSelected(false);
        else if (button2.isSelected() == true)
        button2.setSelected(false);
        group.clearSelection();
    }Note we don't usually write if(foo == true), it's enough to say if(foo).
    You will get better and faster help from the Swing forum and it helps everyone if posts are made to the right place. http://forum.java.sun.com/forum.jspa?forumID=57

  • Please please help trouble with exported quality

    please please help me> i have been searching the net for over 3 hrs for a solution and whatever I have found has been a little too technical for me . I am uploading video to i movie from a disk. the file types on the disk are mp4. I am then editing the clips on iMovie '09 when I go to export the movie I am chosing to export movie as a "large" 960x540
    .mov file. The quality ***...it is blurry and grainy and unusable. Someone in another forum told me to run the mp4 movie in quicktime and tell them what movie inspector says about the clip. Movie inspector says:
    Formatt: Apple MPEG4 Decompressor, 640 × 480, Millions
    FPS: 29.97
    Playing FPS: 30
    Data size 129 MB
    Data Rate: 1504.39 kbits/s
    Size 640 x 480
    I am dying over here any help please? and thank you all so much

    once I share to the media browser where does it go? cant find it.
    It's "hidden" in your user folder Movies>iMovie Projects. Right-click (Control-click) on the name of your Project and select "Show Package Contents". In the folder named Movies you will see your exported file. It could be either a .m4v or .mov file, or possibly another type, depending on whether standard definition or high definition and the size option chosen when exported. If you are producing a DVD, you drag the file from iDVD's Media-Movies pane onto the Theme background.
    Also, when sharing to the media browser I can only save it as "medium" quality...the other choices arent available?
    Then AppleMan's earlier advice will be correct (as always) - he recommended using the Medium setting based on your QuickTime details. It appears that your original MP4 video has an aspect ratio of 4:3, unless your Project settings are incorrect. You set the dimensions (standard 4:3, widescreen 16:9 or iPhone 3:2) of the project in File>Project Properties then selecting the General tab.
    In iMovie '09, I've mainly worked with AVCHD video which produces .MTS files that are converted to AIC (Apple Intermediate Codec) on import. This is high definition footage which iMovie can import as 1920 x 1080 or 960 x 540 (both widescreen 16:9). Hence, on export I can share at Large (960 x 540) or HD (1280 x 720). I'm not sure why you are only seeing a Medium option - could be due to the aspect ratio or maybe it's standard definition in MP4 format (just guessing!). If other options are greyed out, have you tried ticking the boxes - that activates each option for me.
    John

  • Please Help, trouble with j2sdk 1.4.2

    Hello anyone,
    Im only a rookie with java so,
    can some one please help me on why Java 2 SDK 1.4.2 cant preview my class files
    i have made very simple programs and compiled them by javac and after i type java (file name).class its come up with an error msg.
    the code is...
    import java.util.*;
    public class ExampleProgram
    public static void main(String[] args)
    System.out.println("Testing Java");

    Hello Mike and BBQ Frito
    thanx for all your help it works now
    all i had to do was type SET CLASSPATH and then type the file without .class
    thanx again bye
    andy

  • Case statement to compare date and then count duration from only one date

    Hi All;
    I need to compare two dates and if date 1 > date 2 then consider date 2 and count its duration of appointments  from date 2
     case when CTE.scheduledstart  between [dbo].[DateTimeConvert] (new_dateofapplication) and 
             [dbo].[DateTimeConvert](ac.new_businessstartdate)
             then
            (CTE.scheduleddurationminutes)
     when  ( [dbo].[DateTimeConvert] (new_dateofapplication) >  [dbo].[DateTimeConvert](ac.new_businessstartdate))
            then
             [dbo].[DateTimeConvert](ac.new_businessstartdate)
            end as 'AFTERAPP',
    Any help on this is much appreciated
    I need to use case statement fro this
    Thanks
    Pradnya07

    when you say list of Appointments from Appointments table calculate duration from this date [dbo].[DateTimeConvert]
    do you mean find out duration from multiple record? or do you want
    suration for each row? also what represents this date here? Is it new_dateofapplication?
    can you show expected result for the data posted above?
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Please Help trouble with error Java 34

    I'm working on a basic program that uses JButton and JFrame for display/activity, I have been able to get the rest of the program running but I get this error when trying to Register a button event listener.
    .java:34: non-static variable this cannot be referenced from a static context
              createAction = new ButtonHandler();
    ^
    The code I used to create this Button is
         JButton create;
              ButtonHandler createAction;
              create = new JButton("Create");
              createAction = new ButtonHandler();
              create.addActionListener(createAction);
    Does anyone know why I am getting this error? I tried removing Static from my class main declaration but then the program terminates with this error
    java.lang.NoSuchMethodError: main
    Exception in thread "main"
    ----jGRASP wedge2: exit code for process is 1.
    Edited by: Grudairian on Oct 25, 2007 3:39 PM

    Grudairian wrote:
    I'm working on a basic program that uses JButton and JFrame for display/activity, I have been able to get the rest of the program running but I get this error when trying to Register a button event listener.
    .java:34: non-static variable this cannot be referenced from a static context
              createAction = new ButtonHandler();
    ^
    The code I used to create this Button is
         JButton create;
              ButtonHandler createAction;
              create = new JButton("Create");
              createAction = new ButtonHandler();
              create.addActionListener(createAction);
    Does anyone know why I am getting this error? I tried removing Static from my class main declaration but then the program terminates with this error
    java.lang.NoSuchMethodError: main
    Exception in thread "main"
    ----jGRASP wedge2: exit code for process is 1.
    Edited by: Grudairian on Oct 25, 2007 3:39 PMWhat you are trying to do is so overwhelmingly wrong that there is absolutely no way you have any idea what you are doing. You most certainly should not be trying to build GUI applications; have you gone through the Sun tutorial? Do you understand what the static (notice that it is all lowercase, because java is a case sensitive language) keyword means? How about the "this" keyword? Do you know what an instance is? Do you know the difference between a class and an object? If the answers to ANY of those questions is "no", then you need to go through the basic java tutorial:
    http://java.sun.com/docs/books/tutorial/

  • Please help me with this urgent viewing and editing question for a long video clip.

    Hi, I have never used this software before and when I imported a 2 hours and 12 minute video clip of my sister's wedding into the system and added it as one sequence into the program it would only allow me to watch and edit the first 2 minutes.
    Why is that and how can I rectify this so that I can watch and edit the whole clip?
    Also, can such a long video clip be edited by trimming it and creating transitions where I see fit?
    Thanks so much for your advice as I am feeling really stuck right now.
    Becky

    First, the tutorial list in message #3 http://forums.adobe.com/message/2276578 may help
    2nd, More information needed for someone to help... please click below and provide the requested information
    -Information FAQ http://forums.adobe.com/message/4200840
    3rd, did you do the below to be sure your project is correct?
    See 2nd post for picture of NEW ITEM process http://forums.adobe.com/message/3776153
    -and a FAQ on sequence setting http://forums.adobe.com/message/3804341

  • I'm really frustraded - Please help - Trouble with printing

    Hello guys, Im programing a software for a parking lot in java. I need to print tickets with an EPSON U220 printer. When I print, the margins of the paper are all messed up. It seems I can only print from the half of the paper to the left. What can it be? also, when I print from notepad the same happens, half of the paper is blank and only the other half prints.
    How could I solve this problem?
    Where could I start reading?
    Thanks ALOT for your time!
    Best regards
    Michel
    Edited by: mbehlok on Oct 23, 2009 8:02 PM

    mbehlok wrote:
    also, when I print from notepad the same happensSounds like the issue is completely unrelated to Java. Maybe a printer driver bug. Check/contact Epson support.

  • Help with a CASE statement

    Please help me with a CASE Statement:
    - When ID = 15, 16, 17, 18 then "Bad"
    - when ID = 19, then "Average"
    - when ID = 21, then "Good"
    - else "Null"
    Thank you!!

    Well the 1st thing to do would be to correct my poor spelling... change    Delault : to Default :
    Don't know why you would get an error stating "The result of selection formula must be a boolean". It's working fine on my machine.
    If your ID field is numbers stored text you have a couple different options...
    1) Convert the ID to a number...
    Select  ToNumber({home.noone_ID})
    2) Wrap the ID values in double quotes...
       Case "15", "16", "17", "18" :
          "BAD"
    Even if this were your problem... the error should be something other than the boolean thing...
    Jason

  • Need some help with a case statement implementation

    I am having trouble using a CASE statement to compare values and then display the results. The other issue is that i want to put these results in a separate column somehow.
    Heres how the code would look:
    SELECT "Task"."Code",
    "Stat" = CASE WHEN "Task.Code" = 1 THEN string
    ....and so on
    I wanted to make "Stat" the new column for the results, and string represents the string to be assigned if 1 was the value for code. I keep getting syntax error, any help would be nice.

    This is a lot easier than you might think.
    1) First, move another column of "Code" to your workspace.
    2) Click on the fx button and then on the BINS tab.
    3) Click on "Add BIN" and with the operand on "is equal to/is in," input 1 and then click "OK."
    4) Name this what you had for "string."
    Repeat for all the different values you want to rename as another "string" value.
    5) Finally, check the "custom heading" checkbox, and rename this column "Stat" as you indicated.
    That's it.

  • HT5622 hey! i have a serious problem coming up which is that i am asked to enter my billing info even for free apps. why should i pay for apps which are free? please help me with this problem!

    hey! i have a serious problem coming up which is that i am asked to enter my billing info even for free apps. why should i pay for apps which are free? please help me with this problem! and in the billing info there is pop-up box saying i have accessed my account from didfferent computer but no i have been doing it from the same pc. please help me out.

    Tap Settings > General > International. Make sure the Region Format is correct.
    As for your Apple ID. Tap Settings > Store > Apple ID > iForgot
    Resetting your Apple ID may help.
    Congrats on your new iPad !!!

  • Please Help Me With My Yahoo App Problem

    Please Help Me With My Yahoo App Problem, Everytime I Want To Log In To Yahoo With Yahoo Application This Messege Appears, Please Help Me With this

    Do you have a blackberry data plan as opposed to a standard carrier data plan? 

  • Please help me with this statement

    Hi gurus, glad to be back!
    Please help me with this XML processing statement. The XMl I get is like this,
    <EnumerationValue description="Motor Carriers-Operate w/o Certificate or Permit"
    effectiveDate="1859-01-01">
              <Text>26</Text>
              <AssociatedValue type="SeverityLevelText" code="MSD">
                   <Text>Misdemeanor</Text>
              </AssociatedValue>
              <AssociatedValue type="SeverityLevelText" code="PMD">
                   <Text>Petty Misdemeanor</Text>
              </AssociatedValue>
              <AssociatedValue type="StatuteOrdinanceRuleCite">
                   <Text>221.291.4</Text>
              </AssociatedValue>
    I need to get the number value from <Text>26</Text>, the attribute description and the text value of <Text>221.291.4</Text> inside one of those AssociatedValue node. The following is what I have, though I get the 26, I do not get the description and I get the Misdemeanor, Petty Misdemeanor concatenated with the text value of <Text>221.291.4</Text>. The output I get is this,
    26
    MisdemeanorPetty Misdemeanor221.291.4MisdemeanorPe
    4
    MisdemeanorPetty Misdemeanor221.291.4MisdemeanorPe
    My Code:
    declare
         v_xml sys.xmltype;
         v_sid     number;
         v_SText     varchar2(50);
    begin
         v_xml := sys.xmltype('<SimpleTypeCompanion>
              <EnumerationValue description="Motor Carriers-Operate w/o Certificate or Permit" effectiveDate="1859-01-01">
              <Text>26</Text>
              <AssociatedValue type="SeverityLevelText" code="MSD">
                   <Text>Misdemeanor</Text>
              </AssociatedValue>
              <AssociatedValue type="SeverityLevelText" code="PMD">
                   <Text>Petty Misdemeanor</Text>
              </AssociatedValue>
              <AssociatedValue type="StatuteOrdinanceRuleCite">
                   <Text>221.291.4</Text>
              </AssociatedValue>
         </EnumerationValue>
         <EnumerationValue description="Police Communication Equipment-Possession, Use-First Offense-M" effectiveDate="1859-01-01">
         <Text>4</Text>
         <AssociatedValue type="SeverityLevelText" code="MSD">
              <Text>Misdemeanor</Text>
         </AssociatedValue>
         <AssociatedValue type="SeverityLevelText" code="PMD">
              <Text>Petty Misdemeanor</Text>
         </AssociatedValue>
         <AssociatedValue type="StatuteOrdinanceRuleCite">
              <Text>299C.37.1(b)</Text>
         </AssociatedValue>
         </EnumerationValue>
         </SimpleTypeCompanion>');
         ---dbms_output.put_line(v_xml.getStringVal());
         declare
              cursor c_statutes is
              select ms.* from
              xmltable('for $s in /SimpleTypeCompanion/EnumerationValue/Text
                   let $sa := /SimpleTypeCompanion/EnumerationValue/AssociatedValue
                   let $sd := /SimpleTypeCompanion/EnumerationValue/@description
                   where $sa/@type = "StatuteOrdinanceRuleCite"
                   return
                        <MyStatutes>
                             <TextID>{$s}</TextID>
                             <SDesc>{$sd/@description}</SDesc>
                             <StatuteNumber>{$sa/Text}</StatuteNumber>
                        </MyStatutes>'
                   passing v_xml
                   columns
                   myTextID     number path '/MyStatutes/TextID',
                   mySDesc          varchar2(150) path '/MyStatutes/SDesc',     
                   myStatute     varchar2(50)     path '/MyStatutes/StatuteNumber'
              ) ms;
         begin
              for v_s in c_statutes loop
                   dbms_output.put_line(v_s.myTextID);
                   dbms_output.put_line(v_s.MySDesc);
                   dbms_output.put_line(v_s.myStatute);
              end loop;
         end;
    end;
    Please show me the correct way to get the result I want.
    Thanks a lot!
    Ben

    SQL>  var xmltext varchar2(4000)
    SQL> --
    SQL> begin
      2    :xmltext :=
      3  '<SimpleTypeCompanion>
      4     <EnumerationValue description="Motor Carriers-Operate w/o Certificate or Permit" effectiveDate="1859-01-01">
      5             <Text>26</Text>
      6             <AssociatedValue type="SeverityLevelText" code="MSD">
      7                     <Text>Misdemeanor</Text>
      8             </AssociatedValue>
      9             <AssociatedValue type="SeverityLevelText" code="PMD">
    10                     <Text>Petty Misdemeanor</Text>
    11             </AssociatedValue>
    12             <AssociatedValue type="StatuteOrdinanceRuleCite">
    13                     <Text>221.291.4</Text>
    14             </AssociatedValue>
    15     </EnumerationValue>
    16     <EnumerationValue description="Police Communication Equipment-Possession, Use-First Offense-M" effectiveDate="1859-01-01">
    17             <Text>4</Text>
    18             <AssociatedValue type="SeverityLevelText" code="MSD">
    19                     <Text>Misdemeanor</Text>
    20             </AssociatedValue>
    21             <AssociatedValue type="SeverityLevelText" code="PMD">
    22                     <Text>Petty Misdemeanor</Text>
    23             </AssociatedValue>
    24             <AssociatedValue type="StatuteOrdinanceRuleCite">
    25                     <Text>299C.37.1(b)</Text>
    26             </AssociatedValue>
    27     </EnumerationValue>
    28  </SimpleTypeCompanion>';
    29  end;
    30  /
    PL/SQL procedure successfully completed.
    SQL> set lines 150
    SQL> --
    SQL> select ms.*
      2    from xmltable
      3         (
      4           '/SimpleTypeCompanion/EnumerationValue'
      5           passing xmltype(:xmltext)
      6           columns
      7           DESCRIPTION            varchar2(32) path '@description',
      8           STATUTE_ID             number(2) path 'Text/text()',
      9           STATUTE_RULE_CITE      varchar2(16) path 'AssociatedValue[@type="StatuteOrdinanceRuleCite"]/Text/text()',
    10           MSD_TEXT               varchar2(10) path 'AssociatedValue[@code="MSD"]/Text/text()',
    11           PMD_TEXT               varchar2(10) path 'AssociatedValue[@code="PMD"]/Text/text()'
    12        ) ms
    13  /
    DESCRIPTION                      STATUTE_ID STATUTE_RULE_CIT MSD_TEXT   PMD_TEXT
    Motor Carriers-Operate w/o Certi         26 221.291.4        Misdemeano Petty Misd
    Police Communication Equipment-P          4 299C.37.1(b)     Misdemeano Petty Misd
    SQL>
    SQL>

  • I bought a movie the movie Godzilla 2014 recently but it didn't show up in my library. I went check the itunes store and it wants me to buy it again. Please help me with this problem.

    I just bought this movie "Godzilla 2014" but it won't show in my Movie Library. I closed my Itunes and put it back on again but still won't show up. I checked my purchased list and it shows that I recently bought the movie but when I checked the itunes store it wants to buy the movie again. Please help me with this right away Apple.

    Apple Store Customer Service at 1-800-676-2775 or visit online Help for more information.
    To contact product and tech support: Contacting Apple for support and service - this includes
    international calling numbers..
    For Mac App Store: Apple - Support - Mac App Store.
    For iTunes: Apple - Support - iTunes.

Maybe you are looking for