XMLForest with multiple subqueries return not some tags

Hello

PL/SQL in Oracle 11.2.0.1.0 (stored procedure).

I am using this slider (I only show a part of the cursor - hope that is not a problem):

XMLForest)
XMLForest)
(SELECT XMLConcat)
XMLForest (brd.service_date AS "ns3:BeginDate",
'INF' AS 'ns3:ActionCode'),
XMLElement ("AnimalEventType",
XMLElement ("ns3:Insemination",
XMLElement ("ns3:Bull",
XMLElement("ns3:RegistrationAnimalNumber", brd.sire_reg_id)))
OF cmi_breedings brd
WHERE brd.anm_id = anm.id
AND brd.sire_reg_id IS NOT NULL
AND brd.service_date = (SELECT MAX (brd2.service_date)
OF cmi_breedings brd2
WHERE brd2.anm_id = brd.anm_id)) AS "AnimalEvent."
(SELECT XMLConcat)
XMLForest (lct.start_date AS "ns3:BeginDate",
'INF' AS 'ns3:ActionCode'),
XMLElement ("AnimalEventType",
XMLElement ("ns3:Parturition",
XMLElement("ns3:LactationNumber", lct.lact_no)))
OF cmi_lactations lct
WHERE lct.anm_id = anm.id
AND lct.start_date = (SELECT MAX (lct2.start_date)
OF cmi_lactations lct2
WHERE lct2.anm_id = lct.anm_id)) AS "AnimalEvent."
(SELECT XMLConcat)
XMLForest (lct.end_date AS "ns3:BeginDate",
'INF' AS 'ns3:ActionCode'),
XMLElement ("AnimalEventType",
XMLElement ("ns3:DryOff")))
OF cmi_lactations lct
WHERE lct.anm_id = anm.id
AND lct.end_date = (SELECT MAX (lct2.end_date)
OF cmi_lactations lct2
WHERE lct2.anm_id = lct.anm_id)) AS "AnimalEvent."
(SELECT XMLConcat)
XMLForest (prg.prgncy_chk_date AS "ns3:BeginDate",
'INF' AS 'ns3:ActionCode'),
XMLElement ("AnimalEventType",
XMLElement ("ns3:PregnancyCheck",
XMLElement ("ns3:PregnancyCheckResult", DECODE (prg.prgncy_ind, '1', 'F', 'E')))
OF cmi_pregnancies prg
WHERE prg.anm_id = anm.id
AND prg.prgncy_chk_date = (SELECT MAX (prg2.prgncy_chk_date)
OF prg2 cmi_pregnancies
WHERE prg2.anm_id = prg.anm_id)) AS 'AnimalEvent '.
) AS "AnimalEvents".
)

which means (as expected and works perfectly):

< AnimalEvents >
< AnimalEvent >
< ns3:BeginDate > 1997 - 09 - 08 < / ns3:BeginDate >
< ns3:ActionCode > INF < / ns3:ActionCode >
< AnimalEventType >
< ns3:Insemination >
< ns3:Bull >
< ns3:RegistrationAnimalNumber > 5401809 < / ns3:RegistrationAnimalNumber >
< / ns3:Bull >
< / ns3:Insemination >
< / AnimalEventType >
< / AnimalEvent >
< AnimalEvent >
< ns3:BeginDate > 1997 - 05 - 10 < / ns3:BeginDate >
< ns3:ActionCode > INF < / ns3:ActionCode >
< AnimalEventType >
< ns3:Parturition >
< ns3:LactationNumber > 8 < / ns3:LactationNumber >
< / ns3:Parturition >
< / AnimalEventType >
< / AnimalEvent >
< AnimalEvent >
< ns3:BeginDate > 1998 - 02 - 02 < / ns3:BeginDate >
< ns3:ActionCode > INF < / ns3:ActionCode >
< AnimalEventType >
< ns3:DryOff / >
< / AnimalEventType >
< / AnimalEvent >
< / AnimalEvents >

However, if I wanted to return several rows for an animal insemination event by changing the query like this:


XMLForest)
XMLForest)
(SELECT XMLConcat)
XMLForest (brd.service_date AS "ns3:BeginDate",
'INF' AS 'ns3:ActionCode'),
XMLElement ("AnimalEventType",
XMLElement ("ns3:Insemination",
XMLElement ("ns3:Bull",
XMLElement("ns3:RegistrationAnimalNumber", brd.sire_reg_id)))
OF cmi_breedings brd
WHERE brd.anm_id = anm.id
AND brd.sire_reg_id IS NOT NULL
AND brd.service_date > (SELECT MIN (brd2.service_date) <-what IS THE LINE has BEEN CHANGED)
OF cmi_breedings brd2
WHERE brd2.anm_id = brd.anm_id)) AS "AnimalEvent."
(SELECT XMLConcat)
XMLForest (lct.start_date AS "ns3:BeginDate",
'INF' AS 'ns3:ActionCode'),
XMLElement ("AnimalEventType",
XMLElement ("ns3:Parturition",
XMLElement("ns3:LactationNumber", lct.lact_no)))
OF cmi_lactations lct
WHERE lct.anm_id = anm.id
AND lct.start_date = (SELECT MAX (lct2.start_date)
OF cmi_lactations lct2
WHERE lct2.anm_id = lct.anm_id)) AS "AnimalEvent."
(SELECT XMLConcat)
XMLForest (lct.end_date AS "ns3:BeginDate",
'INF' AS 'ns3:ActionCode'),
XMLElement ("AnimalEventType",
XMLElement ("ns3:DryOff")))
OF cmi_lactations lct
WHERE lct.anm_id = anm.id
AND lct.end_date = (SELECT MAX (lct2.end_date)
OF cmi_lactations lct2
WHERE lct2.anm_id = lct.anm_id)) AS "AnimalEvent."
(SELECT XMLConcat)
XMLForest (prg.prgncy_chk_date AS "ns3:BeginDate",
'INF' AS 'ns3:ActionCode'),
XMLElement ("AnimalEventType",
XMLElement ("ns3:PregnancyCheck",
XMLElement ("ns3:PregnancyCheckResult", DECODE (prg.prgncy_ind, '1', 'F', 'E')))
OF cmi_pregnancies prg
WHERE prg.anm_id = anm.id
AND prg.prgncy_chk_date = (SELECT MAX (prg2.prgncy_chk_date)
OF prg2 cmi_pregnancies
WHERE prg2.anm_id = prg.anm_id)) AS 'AnimalEvent '.
) AS "AnimalEvents".
)

I get an error message on several rows returned (and that's what I want to be returned in some cases, more than one record).

For example, I would look like this (notice that I have an extra "insemination" in the example below):

< AnimalEvents >
< AnimalEvent >
< ns3:BeginDate > 1997 - 09 - 08 < / ns3:BeginDate >
< ns3:ActionCode > INF < / ns3:ActionCode >
< AnimalEventType >
< ns3:Insemination >
< ns3:Bull >
< ns3:RegistrationAnimalNumber > 5401809 < / ns3:RegistrationAnimalNumber >
< / ns3:Bull >
< / ns3:Insemination >
< / AnimalEventType >
< / AnimalEvent >
< AnimalEvent >
< ns3:BeginDate > 1998 - 09 - 08 < / ns3:BeginDate >
< ns3:ActionCode > INF < / ns3:ActionCode >
< AnimalEventType >
< ns3:Insemination >
< ns3:Bull >
< ns3:RegistrationAnimalNumber > 2221809 < / ns3:RegistrationAnimalNumber >
< / ns3:Bull >
< / ns3:Insemination >
< / AnimalEventType >
< / AnimalEvent >
< AnimalEvent >
< ns3:BeginDate > 1997 - 05 - 10 < / ns3:BeginDate >
< ns3:ActionCode > INF < / ns3:ActionCode >
< AnimalEventType >
< ns3:Parturition >
< ns3:LactationNumber > 8 < / ns3:LactationNumber >
< / ns3:Parturition >
< / AnimalEventType >
< / AnimalEvent >
< AnimalEvent >
< ns3:BeginDate > 1998 - 02 - 02 < / ns3:BeginDate >
< ns3:ActionCode > INF < / ns3:ActionCode >
< AnimalEventType >
< ns3:DryOff / >
< / AnimalEventType >
< / AnimalEvent >
< / AnimalEvents >

I tried to use the XMLAgg() in the part of the query that returns the inseminations, but it comes down to something like this (I've lost my < Animalevent > for the second record of the insemination, I want it to look to the example above):

< AnimalEvents >
< AnimalEvent >
< ns3:BeginDate > 1997 - 09 - 08 < / ns3:BeginDate >
< ns3:ActionCode > INF < / ns3:ActionCode >
< AnimalEventType >
< ns3:Insemination >
< ns3:Bull >
< ns3:RegistrationAnimalNumber > 5401809 < / ns3:RegistrationAnimalNumber >
< / ns3:Bull >
< / ns3:Insemination >
< / AnimalEventType >
< ns3:BeginDate > 1998 - 09 - 08 < / ns3:BeginDate >
< ns3:ActionCode > INF < / ns3:ActionCode >
< AnimalEventType >
< ns3:Insemination >
< ns3:Bull >
< ns3:RegistrationAnimalNumber > 2221809 < / ns3:RegistrationAnimalNumber >
< / ns3:Bull >
< / ns3:Insemination >
< / AnimalEventType >
< / AnimalEvent >
< AnimalEvent >
< ns3:BeginDate > 1997 - 05 - 10 < / ns3:BeginDate >
< ns3:ActionCode > INF < / ns3:ActionCode >
< AnimalEventType >
< ns3:Parturition >
< ns3:LactationNumber > 8 < / ns3:LactationNumber >
< / ns3:Parturition >
< / AnimalEventType >
< / AnimalEvent >
< AnimalEvent >
< ns3:BeginDate > 1998 - 02 - 02 < / ns3:BeginDate >
< ns3:ActionCode > INF < / ns3:ActionCode >
< AnimalEventType >
< ns3:DryOff / >
< / AnimalEventType >
< / AnimalEvent >
< / AnimalEvents >

I tried different combinations of XMLAgg() for the multiple rows returned, and he allowed too lines returned the error to go away, but at the expense of the tag being AnimalEvent to be reproduced for the same animals event or be there only once when there are several animal events.  I know I'm close to the solution and I bet it's very simple, but I don't get it.

The only "rules" that I need are:

1. the AnimalEvents tag must appear only once and only as it is at least an AnimalEvent.

2. no blank/empty tag should appear.  For example, if there is no AnimalEvent tag while there should be no tag AnimalEvents.

3. even if I'm trying to select the records of several "insemination" only so far for this particular test, all 4 potential AnimalEvents ("Insémination", "Parturition", 'DryOff' and 'PregnancyCheck') will be rescheduled to select multiple records later.

4. each animal individual event ("Insemination", "Parturition", 'DryOff', 'PregnancyCheck') should be locked up by the AnimalEvent tag.

I don't know if I'm missing any other details?

Help, please!  Thank you.

I guess you wrote that because I used it somewhere, that seems like a bad idea

I understand why you used, and why most of the people use it in this kind of situation, but as see you it clearly now, it is not suitable more to what you aim at. Where my suggestion while trying not to use in the first place.

In addition, XMLForest is just a shortcut, in fact, a combination of a CASE statement and XMLElement that Oracle develops during analysis.

In some cases, where the subquery caching is not possible for example, that made a request using XMLForest performs badly if the operands are complex because they are used twice during the assessment.

Here's a simple example:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> set serveroutput on
SQL>
SQL> create or replace function get_data (p_input in number) return number is
  2  begin
  3    dbms_output.put_line('You called me!');
  4    return p_input;
  5  end;
  6  /

Function created.

SQL> select xmlserialize(content xmlforest(get_data(1) as "test"))
  2  from dual;

XMLSERIALIZE(CONTENTXMLFOREST(GET_DATA(1)AS"TEST"))
--------------------------------------------------------------------------------
1

You called me!
You called me!

The function is called twice, because Oracle rewrites the XMLForest call to:

BOX WHEN get_data (1) IS NOT NULL THEN XMLElement ('test', get_data (1)) END

Of course, the function can be deterministic, but this isn't the point here.

In your case, since you are with subqueries, those are probably cached and executed only once, but I think it is useful to know the internal mechanisms, however.

Back to your question, how about something like this:

XMLForest(
  -- concat the four possible events
  XMLConcat(
    -- Insemination
    (
      SELECT CASE WHEN count(*) != 0
             THEN XMLAgg(
                    XMLElement("AnimalEvent",
                       XMLForest(brd.service_date AS "ns3:BeginDate",
                                 'INF'            AS "ns3:ActionCode"),
                       XMLElement("AnimalEventType",
                          XMLElement("ns3:Insemination",
                             XMLElement("ns3:Bull",
                                XMLElement("ns3:RegistrationAnimalNumber", brd.sire_reg_id))))
                    )
                  )
             END
      FROM   cmi_breedings brd
      WHERE  brd.anm_id       = anm.id
      AND    brd.sire_reg_id  IS NOT NULL
      AND    brd.service_date > (SELECT MIN(brd2.service_date)
                                 FROM   cmi_breedings brd2
                                 WHERE  brd2.anm_id = brd.anm_id)
    ),
    -- Parturition
    (
      SELECT CASE WHEN count(*) != 0
             THEN XMLAgg(
                    XMLElement("AnimalEvent",
                      XMLForest(lct.start_date AS "ns3:BeginDate",
                                'INF'          AS "ns3:ActionCode"),
                      XMLElement("AnimalEventType",
                         XMLElement("ns3:Parturition",
                            XMLElement("ns3:LactationNumber", lct.lact_no)))
                    )
                  )
             END
      FROM   cmi_lactations lct
      WHERE  lct.anm_id     = anm.id
      AND    lct.start_date > (SELECT MIN(lct2.start_date)
                               FROM   cmi_lactations lct2
                               WHERE  lct2.anm_id = lct.anm_id)
    ),
    -- DryOff
    (
      SELECT CASE WHEN count(*) != 0
             THEN XMLAgg(
                    XMLElement("AnimalEvent",
                      XMLForest(lct.end_date AS "ns3:BeginDate",
                                'INF'        AS "ns3:ActionCode"),
                      XMLElement("AnimalEventType",
                         XMLElement("ns3:DryOff"))
                    )
                  )
             END
      FROM   cmi_lactations lct
      WHERE  lct.anm_id   = anm.id
      AND    lct.end_date > (SELECT MIN(lct2.end_date)
                             FROM   cmi_lactations lct2
                             WHERE  lct2.anm_id = lct.anm_id)
    ),
    -- PregnancyCheck
    (
      SELECT CASE WHEN count(*) != 0
             THEN XMLAgg(
                    XMLElement("AnimalEvent",
                      XMLForest(prg.prgncy_chk_date AS "ns3:BeginDate",
                                'INF'               AS "ns3:ActionCode"),
                      XMLElement("AnimalEventType",
                         XMLElement("ns3:PregnancyCheck",
                            XMLElement("ns3:PregnancyCheckResult", DECODE(prg.prgncy_ind, '1', 'F', 'E'))))
                    )
                  )
             END
      FROM   cmi_pregnancies prg
      WHERE  prg.anm_id          = anm.id
      AND    prg.prgncy_chk_date > (SELECT MIN(prg2.prgncy_chk_date)
                                    FROM   cmi_pregnancies prg2
                                    WHERE  prg2.anm_id = prg.anm_id)
    )
  ) AS "AnimalEvents"
)

Here, the AnimalEvent tag is included directly in the subquery, before the aggregation, removing the need for deeper XMLConcat in the process.

If the subquery returns no rows, no tag is generated through the CASE statement.

Tags: Oracle Development

Similar Questions

  • A single Firefox window with multiple tabs is not displayed, and yet other new windows will be

    Question [1], a problem that I need help. .

    Is this a window of my browser, with all my precious tabs will not appear anywhere but the taskbar. [2] I know that windows have loaded, but they cling. [3] this I theorize is the fulfillment of one page - one tab - among the 30 + other tabs. [4] this same thing has happened before, but very rarely. .

    I was wondering if there was anyway to solve this problem all always back my very important tabs? Thank you. .

    [1] I have already once previously written this question altogether, but he disappeared after I registered my email. . Once again, rewrite.

    [2] I can always raise new windows and new tabs within these windows, however, the other window, with all other pages are stuck.

    [3] because it pushes me with a download, or play some videos of nowhere to commissioning.

    [4] may not be the case, who knows. . It's happened before, never go to the beta version.

    I solved the problem easily. What I did was stationary my mouse on the preview of the window in the bar of tasks, right click and you press on enlarge. It seems that one of the scripts on one of the windows made the window very small Firefox, or something similar.

  • Buttons with multiple actions do not work in v32.1

    We had buttons in our previously published folios that bring a multi-state object to state first and second MSO to another State that depends on which button is pressed. It works in app v32.0 and down, but it no longer works after trying to update our v32.1 app.

    If it is possible to have buttons with more action, I think we should be aware in What's New Relaese v32.1 Notes. Because it is not get ourselves as a bug. Can someone please tell us whether this is a permanent change button feature in DPS folios or is it happens by mistake?

    The fix for this was released Monday afternoon hour of Seattle.

    Neil

  • RH10 HTML &gt; Webhelp &gt; elements of Index with multiple entries are not displayed in IE9

    When I click on an element of Webhelp Index with entries multile, nothing happens. I had this problem with HTML RH8 too.  I tried to disable the Popup blocker, but that does not solve it.

    Can someone suggest a solution to this problem?

    Hi Karen,.

    Thanks for the workaround. Unfortunately, it has not worked for IE9 browser.

    Best regards

    Paul

  • Smartphones blackBerry to go XLS documents does not work with multiple sheets

    After that I upgraded the storm, Documents to Go will not edit XLS files with multiple documents.  I have improved the DTG and still currently editing a spreadsheet with multiple on-page errors.

    "this file is read only the following unsupported of content:

    Names of:

    AVT. Every day. _. Travel._.log._.1

    etc for each cell that bears on the other page.

    Before the update has worked well.

    Thank you. I did yesterday as well. I got this morning from a worksheet that everything was working ok.  Must be an error in the sheets that I opened.  I can't find the errors, but leaves, everything seems to work rewriting.

    Starting at ground zero is perhaps the best option sometimes.

  • I don't know my product key. I don't have a disk it came with the pc and below when I try to read I can not, some numbers are scratched and I just format my pc what can do?

    I don't know my product key. I don't have a disk it came with the pc and below when I try to read I can not, some numbers are scratched and I just format my pc what can do?

    Just installed windows 7 but I can't read my product key?

    Help me please thx!

    Option 1:

    If the COA sticker is damaged, you must use the recovery partition to reinstall Windows 7, it will be exempt from the need to use the product key to activate your installation of Windows 7.

    Option 2:

    If your recovery partition is not available or damaged, you must contact the manufacturer of your computer, and request that a defined recovery disk you can use to reinstall Windows 7. They could practice a small shipping and handling. This will exempt the need to also use the product key.

    Option 3:

    If neither options 1 or 2 is possible, then you will need to invest in a new license of full version of detail.

    Brand

    Online order

    Phone

    Acer

    https://secure.TX.Acer.com/rcdb/main.aspx?brand=Acer

    1-866-539-3901

    ASUS

    http://eStore.ASUS.com/shop

    1-888-678-3688 or

    1-510-739-3777

    Reference Dell

    http://support.Dell.com/support/topics/global.aspx/support/DellCare/en/backupcd_form?c=us&l=en&s=Gen

    1-800-624-9896

    eMachines

    https://secure.TX.Acer.com/rcdb/main.aspx?brand=eMachines

    1-866-539-3901

    Entry door

    https://secure.TX.Acer.com/rcdb/main.aspx?brand=gateway 1-866-539-3901

    HP/Compaq

    http://h10025.www1.HP.com/ewfrf/wc/document?DocName=c00810334&LC=en&DLC=en&cc=us&OS=4063&product=4057208

    1-800-474-6836

    Lenovo/IBM

    http://www-307.IBM.com/PC/support/site.WSS/MIGR-4M7HWZ.html

    1-800-426-7378

    Sony

    https://servicesales.sel.Sony.com/Ecom/accessories/Web/welcome.jsp

    1-800-488-7669

    Toshiba

    https://www.CSD.Toshiba.com/cgi-bin/TAIS/support/JSP/serviceUnitVerification.jsp?orderType=SFF

    1-800-457-7777

  • Why none of the mobile applications are compatible with my Samsung Galaxy Note 10.1 Tablet? I can only use some of the mobile applications with my Samsung Galaxy Note 4

    Each Adobe Mobile App I want to install from the game store Android Google indicates that it is not compatible with my Samsung Galaxy Note 10.1 tablet, but some are compatible with my phone Samsung Galaxy Note 4. I prefer to use mobile apps on my tablet on not on my phone. Can someone explain why I can't use mobile apps on my tablet. I thought that mobile applications are compatible with the tablets and phones?

    Please refer to why none of the mobile applications are compatible with my Samsung Galaxy Note 10.1 Tablet? I can only use some of the mobile applications with my Samsung Galaxy Note 4

    (Double Post)

  • CF 11 Enterprise multiple instances are not created correctly with a separate service account.

    The company that multiple instances are not created correctly with a separate service account.

    The questions that I have are very similar to the issues identified in the link below.

    https://forums.Adobe.com/message/6584848#6584848

    My company of 11 CF will not create additional services for my sites of cold fusion beyond the initial service created during the installation process. My problems are compounded because when I try and uninstall the CF11 Uninstalling application crashes and generates the error below. I now have to try to manually uninstall to reinstall CF11. Any help or suggestion to get the problem solved is welcome.

    Description:

    A problem caused this program blocking interact with Windows.

    Signature of the problem:

    Problem event name: AppHangB1

    Application name: javaw.exe

    Application version: 7.0.510.13

    Application timestamp: 52b25e38

    Hang Signature: 0967

    Hanging Type: 6144

    OS version: 6.1.7601.2.1.0.274.10

    Locale ID: 1033

    Signing of additional blocking 1: 09675b5d8f587c9fd57b85cb72e629da

    Signing of additional blocking 2: 2cff

    Signing of additional blocking 3: 2cff32d5db809ac6ce8170a1d7ac1eb0

    Signature of blocking additional 4:0967

    Signing of additional blocking 5: 09675b5d8f587c9fd57b85cb72e629da

    Signing of additional blocking 6: 2cff

    Signing of additional blocking 7: 2cff32d5db809ac6ce8170a1d7ac1eb0

    I solved the problem with the implementation of Cold Fusion 11. I had to disable Windows server 2008 R2 UAC for all users in order to complete the installation with IIS as a web server. This also solves the problem with the inability to uninstall Cold Fusion.

  • Windows 8 Adobe Reader does not open fully compiled with multiple PDFs in one alone - why pdf?

    Windows 8 Adobe Reader does not open fully compiled with multiple PDFs in one alone - why pdf?

    You can not post attachments in the forum; only insert images in the post.

    Regarding the Flash Player message; If this document contains all the rich media, you will need to install the Flash Player plugin (and not the control ActiveX that is already installed in Windows 8 IE10).

    Download http://download.macromedia.com/pub/flashplayer/current/support/install_flash_player.exe plugin setup

  • date max with multiple joins of tables

    Looking for expert advice on the use of max (date) with multiple joins of tables. Several people have tried (and failed) - HELP Please!

    The goal is to retrieve the most current joined line of NBRJOBS_EFFECTIVE_DATE for each unique NBRJOBS_PIDM. There are several lines by PIDM with various EFFECTIVE_DATEs. The following SQL returns about 1/3 of the files and there are also some multiples.

    The keys are PIDM, POSN and suff

    Select NBRJOBS. NBRJOBS.*,
    NBRBJOB. NBRBJOB.*
    of POSNCTL. Inner join of NBRBJOB NBRBJOB POSNCTL. NBRJOBS NBRJOBS on (NBRBJOB. NBRBJOB_PIDM = NBRJOBS. NBRJOBS_PIDM) and (NBRBJOB. NBRBJOB_POSN = NBRJOBS. NBRJOBS_POSN) and (NBRBJOB. NBRBJOB_SUFF = NBRJOBS. NBRJOBS_SUFF)
    where NBRJOBS. NBRJOBS_SUFF <>'LS '.
    and NBRBJOB. NBRBJOB_CONTRACT_TYPE = 'P '.
    and NBRJOBS. NBRJOBS_EFFECTIVE_DATE =
    (select Max (NBRJOBS1. NBRJOBS_EFFECTIVE_DATE) as 'EffectDate '.
    of POSNCTL. NBRJOBS NBRJOBS1
    where NBRJOBS1. NBRJOBS_PIDM = NBRJOBS. NBRJOBS_PIDM
    and NBRJOBS1. NBRJOBS_POSN = NBRJOBS. NBRJOBS_POSN
    and NBRJOBS1. NBRJOBS_SUFF = NBRJOBS. NBRJOBS_SUFF
    and NBRJOBS1. NBRJOBS_SUFF <>'LS '.
    and NBRJOBS1. NBRJOBS_EFFECTIVE_DATE < = to_date('2011/11/15','yy/mm/dd'))
    order of NBRJOBS. NBRJOBS_PIDM

    Welcome to the forum!

    We don't know what you are trying to do.
    You want all of the columns in the rows where NBRJOBS_EFFECTIVE_DATE is the date limit before a given date (November 15, 2011 in this example) for all rows in the result set with this NBRJOBS_PIDM? If so, here is one way:

    with         GOT_R_NUM     as
    (
         select       NBRJOBS.NBRJOBS.*,
                NBRBJOB.NBRBJOB.*     -- You may have to give aliases, so that every column has a unique name
         ,       rank () over ( partition by  NBRJOBS.NBRJOBS_PIDM
                                   order by      NBRJOBS.NBRJOBS_EFFECTIVE_DATE     desc
                          )             as R_NUM
         from          POSNCTL.NBRBJOB NBRBJOB
         inner join      POSNCTL.NBRJOBS NBRJOBS       on    (NBRBJOB.NBRBJOB_PIDM = NBRJOBS.NBRJOBS_PIDM)
                                            and      (NBRBJOB.NBRBJOB_POSN = NBRJOBS.NBRJOBS_POSN)
                                      and      (NBRBJOB.NBRBJOB_SUFF = NBRJOBS.NBRJOBS_SUFF)
         where       NBRJOBS.NBRJOBS_SUFF             != 'LS'       -- Is this what you meant?
         and        NBRBJOB.NBRBJOB_CONTRACT_TYPE   ='P'
         and       NBRJOBS.NBRJOBS_EFFECTIVE_DATE  <= to_date ('2011/11/15', 'yyyy/mm/dd')
    )
    select       *     -- Or list all columns except R_NUM
    from       GOT_R_NUM
    where       R_NUM          = 1
    order by  NBRJOBS_PIDM
    ;
    

    Normally this site does not display the <>inequality operator; He thinks it's some kind of beacon.
    Whenever you post on this site, use the other inequality operator (equivalent), *! = *.

    I hope that answers your question.
    If not, post a small example of data (CREATE TABLE and INSERT, only relevant columns instructions) for all the tables involved and the results desired from these data.
    Explain, using specific examples, how you get these results from these data.
    Always tell what version of Oracle you are using.
    You will get better results faster if you always include this information whenever you have a problem.

  • Using Outlook Express 6 with multiple identities.

    Had the hard drive problems.  He has been replaced by Dell warranty.  I have set up outlook express 6 with multiple identities.  I can't go from one to the other identity and return to the original, without having to restart my computer.  Dell has said that some things need to be changed to make it work properly.  They tell me what they were without a heavy load.  I used to use this feature with my old hard drive.  Help me please if you can...  Thanks in advance.

    Hi El KG,

    1. do you receive error messages or error codes?

    You can read the following article and check if it helps:

    OLEXP: "identity switch canceled" when starting Outlook Express

    http://support.Microsoft.com/kb/224463

    Also check the following links:

    OLEXP: How to create and use identities in Outlook Express 5.x and 6.0

    http://support.Microsoft.com/kb/209169

    http://www.Microsoft.com/Windows/IE/community/columns/identity.mspx

    http://social.answers.Microsoft.com/forums/en-us/outlookacct/thread/b53f3c5a-3733-4510-91dB-a23dc6224fc5

    Hope this information is useful.

    Jeremy K
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Fine continuous with G Router but not with N

    I recently bought a N-Router Linksys E2000 to replace my current G-Router Linksys WRT54GL in hopes of having the best connection for my Boxee Box wireless. I discovered that my Boxee Box have some problem (every 10 to 20 seconds) of buffering when streaming files .mkv 720 p or 1080 p Wireless with my E2000. I decided to put my good old... surprise and WRT54GL! No buffering... even with my mkv 1080 p... files! I also give it a try to transfer a TV show in 720 p (mkv) by wireless in the HARD drive connected on the Boxee... I have an average speed of 1.70 MB/s with the WRT54GL and not still 400 KB/s with the E2000... What's the problem with him?

    The latest authentic firmware both have 2 routers. The E2000 is set to mixed mode, auto channel and WPA2-Personal (AES). The WRT54GL is set to G only, Channel 6 and WPA2-Personal (AES). Is there something I need to check on my E2000 wireless settings?

    Thank you!

    Change the channel on E2000 to 6 or 11. Save the settings.

    Also try to change some advanced on the router settings wireless. Click on the Wireless tab and go wireless advanced settings. Change the tag to 75 interval, RTS threshold to 2307 and 2306 fragmentation threshold. Save the settings.

    Go to the Configuration tab and change the size MTU to 1365. Save the settings and the cycle of power to the router. See if that helps you.

  • How can I actually talk to support multiple issues with multiple devices (software, hardware, account of the question?

    How can I actually speak to technical support issues to nulitple with multiple devices (software, hardware, account problems,) I have a touch screen of hp with windows 7 Home, Ipod, home router wireless, boost, WiFi, wii, etc.... Problems with windows live net Passport vs msn Id, problems with zune vs itunes and windows media that nobody wants play nice together.

    My touchscreen notes will use only a google account, music another program, and of course until recently google was not an option on the windows phone. of course if I'm going now that I'll lose all the games and music. His tent so frustrating of any help, that nobody seems to know how often these devices and programs interact (or care) HP has been of little use, even for my provider windows, microsoft, living cells and zune etc...

    All the changes that took place this last month will help but gets boring. I consider myself pretty computer savy, but maybe not, should not this difficult. I realized about a year ago I would have hired a technician but it seems immpossible to find someone who knows enough about all of the equipment and software to really do some good. My Hp touchscreen computer does not even play nice with their own HP printers. I really regret the time and money I spent. I could every Mac.

    All of the suggestions. Even your options do not address several problems of interaction with the hardware and software all needs of problems to adapt to a single category.

    Hello


    To correct the software issues run the methods mentioned below.
     
    Method 1: run the troubleshooter and check if the problem is resolved.
    http://Windows.Microsoft.com/en-us/Windows7/open-the-performance-Troubleshooter

    Method 2 : run a SFC (System File Checker) scan and see if the problem occurs.
    http://support.Microsoft.com/kb/929833

    Method 3 : run Clean boot and check if the problem persists.


    To help resolve the error and other messages, you can start Windows XP, Vista or Windows 7 by using a minimal set of drivers and startup programs. This type of boot is known as a "clean boot". A clean boot helps eliminate software conflicts.

    Note: follow step 7 to reset the computer to start as usual after the boot process.
    http://support.Microsoft.com/kb/929135

    To solve the problems related to Windows Live and MSN to check the links below on contact.

     
    To solve the problems related to the HP touch computer

    Update the HP touch drivers from the manufacturers Web site.

    Hope that helps.
  • With multiple vcenter inventory

    Hi guys,.

    Try to get connected with multiple vcenter inventory,

    Have problems with the release of some VM are attributed to wrong Vcenter and running OS is not always correct.

    Can anyone help?

    Here's the script:

    $VmInfo = Foreach ($vcenter in $global: DefaultVIServers) {}

    ForEach ($Datacenter in (Get-Data Center |)) Sort - Object - property name)) {}

    ForEach ($Cluster in ($Datacenter |)) Get-Cluster | Sort - Object - property name)) {}

    ForEach ($VM in ($Cluster |)) Get - VM | Sort - Object - property name)) {}

    ForEach ($HardDisk to ($VM |)) Get-hard drive | Sort - Object - property name)) {}

    "" | Select-Object - property @{N = "VM"; E = {$VM. Name}},

    @{N = 'Vcenter'; E = {$vcenter. Name}},

    @{N = "OS"; E = {$vm. Guest.OsFullName}},

    @{N = 'Center'; {E = {$Datacenter.Name}}.

    @{N = 'Cluster'; E = {$cluster. Name}},

    @{N = 'Host'; E = {$vm. VMHost.Name}},

    @{N = "HostVersion"; E = {$vm. VMHost.version}}

    }

    }

    }

    }

    }

    $VmInfo | Export-Csv - NoTypeInformation - UseCulture-Path "D:\report.csv".

    Try like this.

    -What is produced fewer lines?

    $VmInfo = Foreach ($vcenter in $global: DefaultVIServers) {}

    ForEach ($Datacenter in (Get-Data Center-Server $vcenter |)) Sort - Object - property name)) {}

    ForEach ($Cluster in ($Datacenter |)) Get-Cluster-Server $vcenter | Sort - Object - property name)) {}

    ForEach ($VM in ($Cluster |)) Get-VM-Server $vcenter | Sort - Object - property name)) {}

    ForEach ($HardDisk to ($VM |)) Get-disk hard-Server $vcenter | Sort - Object - property name)) {}

    "" | Select-Object - property @{N = "VM"; E = {$VM. Name}},

    @{N = 'Vcenter'; E = {$vcenter. Name}},

    @{N = "OS"; E = {$vm. Guest.OsFullName}},

    @{N = 'Center'; {E = {$Datacenter.Name}}.

    @{N = 'Cluster'; E = {$cluster. Name}},

    @{N = 'Host'; E = {$vm. VMHost.Name}},

    @{N = "HostVersion"; E = {$vm. VMHost.version}}

    }

    }

    }

    }

    }

    $VmInfo | Export-Csv - NoTypeInformation - UseCulture-Path "D:\report.csv".

  • First Audio interpretation is a track with multiple channels.

    We have 4 audio channels, sometimes 5 or 6 channels (component of integrated audio system, LAV, ramps, etc.). All these channels are in a wav file.

    I want that first pro to interpret these data so that it uses only ONE piece on the timeline, with all the channels that have been heard in this track.

    I watched this tutorial, thinking that it would:

    http://TV.Adobe.com/watch/short-and-suite/mapping-audio-channels-in-premier...

    However, for some reason I can't find an option to do what I want. Did I miss something in the window change Audio channels? I can set the number of tracks to 1, however, it does not allow several channels...

    Now, if this IS possible... Can I still change each channel individually in first?

    I appreciate your response and your knowledge.

    Thank you.


    Sorry, I couldn't find a post edit...

    But this post saved my life, for all who have had the same question!

    Dealing with multiple audio channels in a track: Adobe Premiere Pro

Maybe you are looking for

  • New 40 GB HDD on Satellite A10 501 unrecognized

    I have an old 10-501 with a 30 GB hard drive that just broke. I bought a new one (Hitachi, 40 GB, 5400 rpm, ATA/IDE), but it is not recognized. I went into the BIOS, but nothing. I reformatted my old drive, and it works fine (but noisy) on a partitio

  • Satellite C850 - blue screen at startup

    Hello My elderly father has a Toshiba Satellite C850-1MC laptop - (Intel Pentium B960 2.2 GHz, 4 GB RAM, 500 GB, 15.6 "HD LED, DVDRW, Intel HD, Webcam, Bluetooth, Windows 8 64-bit). When he started the laptop the initial screen appears for a short ti

  • How to send emails to the MS Exchange Server 2010 distribution group?

    Well, I'm not well versed in Exchange, (that I'm learning) so please forgive me for the lack of details correct / lingo. I try to create email for my church, distribution groups.We must be able to send a single email to a group and do it before out t

  • nits and chkdsk performance runs when you power on the computer

    My computer runs chkdsk most of the time I turn on my computer.  Performance is very slow and often I see the words, "not responding" when using Explorer and Outlook.  I have defraged and cleaned my disk several times without success.  I have my anti

  • results of the analysis of poor

    I have a Deskjet 2542 in a series, purchased on 02/04/14 when I scanned a letter before sending him an e-mail the results are unreadable I changed the settings accordingly still always bad results can help before I the take it back to the bridge to p