How to extract the value of a tag XML using regular Expressions

We get a response XML from a WEB SERVICE.

I convert it to VARCHAR2.

Now, I want to get the real answer that is inside the tag of the response.

I tried this:

DECLARE

V_1 VARCHAR2 (30000): = ' < soap: Body > < ns:ProcessArgusFeedsResponse xmlns:ns = "urn: PegaRULES:SOAP:ArgusToPegaFeeds:Services" > ' |

'< response > good < / answer >< / ns:ProcessArgusFeedsResponse > < / soap: Body > ';

v_response VARCHAR2 (100);

BEGIN

DBMS_OUTPUT. PUT_LINE (V_1);

v_response: = REGEXP_SUBSTR (v_1, ' / < >(.+?) < \/Response > answer /');

dbms_output.put_line (v_response);

END;

It does not work.

Any help would be greatly appreicated.

Hello

user12240205 wrote:

We get a response XML from a WEB SERVICE.

I convert it to VARCHAR2.

Why?  XML has its own native ways of analysis; Why not use them?

If you use regular expressions, then REGEXP_REPLACE, as shown above, is a good option in Oracle 10, but starting in Oracle 11.1, you can use REGEXP_SUBSTR like this:

REGEXP_SUBSTR (v_1

, '(.+?)'

1

1

NULL

1

)

The 6th argument is like a backreference; "He tells REGEXP_SUBSTR did not return to the entire organization, but only the part inside the 1st left '(' et correspondant à sa droite).

The '?' to make it non-greedy is necessary only if v_1 can contain more than one response.

Now, I want to get the real answer that is inside the tag of the response.

I tried this:

DECLARE

V_1 VARCHAR2 (30000): = "" |

'Good';

v_response VARCHAR2 (100);

BEGIN

DBMS_OUTPUT. PUT_LINE (V_1);

v_response: = REGEXP_SUBSTR (v_1, ' /(. +?)) <\ esponse="">/');

dbms_output.put_line (v_response);

END;

It does not work.

That's because it's looking for a slash ("/") before the '' tag and another after the ' tag.

The backslash ("\") is not necessary here, but it is not nothing wrong.

Tags: Database

Similar Questions

  • How to extract the values of XMLTYPE column,

    SQL > create table temporary global xmtype_tab (xmlfile xmltype);

    SQL > select * from all_directories;

    SYS RESTOREDIR/home / / dbimptask /.

    insert into xmtype_tab values (xmltype (dbms_xslprocessor.read2clob ('RESTOREDIR ','LAS_SETUP.xml ')));

    1 line of creation.

    SQL > select * from xmtype_tab;

    XMLFILE
    --------------------------------------------------------------------------------
    <? XML version = "1.0"? >
    rowset <>
    < ROW >
    < DATA_CAPTURE_ON > 1 < / DATA_CAPTURE_ON >


    How to extract the values inside each tag?


    XML file has the following data...


    rowset <>
    < ROW >
    < DATA_CAPTURE_ON > 1 < / DATA_CAPTURE_ON >
    < > 9600 BAUD_RATE < / BAUD_RATE >
    < ACK_TIMEOUT > 1 < / ACK_TIMEOUT >
    < TUBE_TRAVEL_LIMIT > 4 < / TUBE_TRAVEL_LIMIT >
    < SEND_SID_TIMEOUT > 1 < / SEND_SID_TIMEOUT >
    < INDEX_Q_TIMEOUT > 2 < / INDEX_Q_TIMEOUT >
    < HW_HANDSHAKING > 1 < / HW_HANDSHAKING >
    < / ROW >
    < / LINES > ';

    I use the Oracle 10.2.0.3 version...

    Why does this work?

    You are missing the tag of the ROWSET:

    select extractvalue (xmlfile, '/ROWSET/ROW/BAUD_RATE') baud_rate
      from xmltype_tab
     where existsnode (xmlfile, '/ROWSET/ROW/BAUD_RATE') = 1;
    
  • To extract the value of particular tag of xmlType

    Hello
    The requirement is to extract the value of the specific tab of an XmlType column.

    Here is the schema of the table:
    CREATE TABLE DTCC_REF)
    MESSAGE XMLTYPE NOT NULL,.
    CashFlowId varchar2 (20)
    )

    This table is already filled with only a value in the Message column. cashFlowId is null for all rows.

    Here are examples of MESSAGE data:
    <? XML version = "1.0" encoding = "UTF-8"? > < env:Envelope xmlns:rm = xmlns:pmnt 'OTC_RM_15-Apr-2005' = xmlns:env 'OTC_Payment_15-Apr-2005' = 'http://schemas.xmlsoap.org/soap/envelope/' xmlns:fpml = "http://www.fpml.org/2004/FpML-4-1" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schemaLocation = "OTC_RM_15-Apr-2005... «/OTC/OTC_RM_15-Apr-2005.xsd OTC_Payment_15-Apr-2005... http://schemas.xmlsoap.org/soap/envelope/ /xmls/OTC/soap-envelope.xsd /OTC/OTC_Payment_15-Apr-2005.xsd "> < env:Header > < OTC_RM xmlns =" OTC_RM_15-Apr-2005 "> < manifest > < PaymentMsg > < activity > edit < / activity > < status > Matched < / status > < LinkStatus > Linked < / LinkStatus > < TransType > payment < / TransType > < AssetClass > credit < / AssetClass > < DTCCUserId > 00006151» < / DTCCUserId > < CounterpartyId > 00006132 < / CounterpartyId > < / PaymentMsg > < MsgId > 1 < / MsgId > < / Manifest > < / env:Header > < env:Body > < OTC_Payment xmlns = "OTC_Payment_15-Apr-2005" > < payment > < ReferenceIdentifiers > < TradeId > 1001513 M < / TradeId > < ContraTradeId > CREC5856 < / ContraTradeId > < LinkId > LINKEE1DSL890420 < / LinkId > < MatchId > PYMTEKGDRP784788 < / MatchId > < CashFlowId > 2005/12 / 200INTEUREUR1001513M < / CashFlowId > < 61326151EUR1220 NetId > < / NetId > < GroupRefId > < / GroupRefId > < ContraGroupRefId > < / ContraGroupRefId > < / ReferenceIdentifiers > < TradeDetails > < TradeType > EXOTIC < / TradeType > < TradeDate > 2004 - 09 - 13 < / TradeDate > < EffectiveDate > 2004 - 09 - 14 < / EffectiveDate > < ScheduledTerminationDate > 2014 - 09 - 20 < / ScheduledTerminationDate > < NotionalAmount > < fpml : currency > EUR < / fpml:currency > < fpml: Amount > 6000000.00 < / fpml:amount > < / NotionalAmount > < EffectiveRate > 0.3150000 < / EffectiveRate > < ReferenceEntity > < / ReferenceEntity > < / TradeDetails > < SettlementDetails > < SourceSSI > < / SourceSSI > < DestinationSSI > < / DestinationSSI > < / SettlementDetails > < / payment > < / OTC_Payment > < / env : Body > < / env:Envelope >

    Now, I have to fill out the tag CashFlowId value in column 2 of the table.

    How can I retrieve value da? Plase help me...
    SQL> with dtcc_ref as ( select xmltype('
    
      
        
          
            
              Modify
              Matched
              Linked
              Payment
              Credit
              00006151
              00006161
            
            2
          
          
            
              DTCC
              DTCC00006151
            
            
              
                http://db.com/route
                2005-11-26T13:59:29.593Z
                2005-11-26T13:59:29.593Z
              
              
                www.dtcc.net
                2005-11-26T09:47:00.000-05:00
                2005-11-26T09:47:00.000-05:00
              
            
          
        
      
      
        
          
            
              1006299M
              0900000702811
              LINKEBHBKD364294
              PYMTEKUBMKN02373
              2005/12/200INTUSDUSD1006299M
              61516161USD1220
              
              
            
            
              REC
              
                USD
                625625.00
              
              2005-12-20
              Unknown
              Fixed
            
            
              EXO
              2004-09-30
              2004-09-30
              2009-03-20
              
                USD
                247500000.00
              
              1.0000000
              
            
            
              
              
            
          
        
      
    ') xml from dual
    )
    --
    --
    select trim(x.column_value) CashFlowId
      from dtcc_ref t, xmltable('declare namespace e = "OTC_Payment_15-Apr-2005";
                                //e:OTC_Payment//e:CashFlowId/text()' passing t.xml) x
    
    CASHFLOWID
    ------------------------------------------------------
    2005/12/200INTUSDUSD1006299M
    1 row selected.
    
  • How to extract the values of the line full in the bean to support using the primary key

    Hello

    I have a table that has columns as plant_name, business planner email id and identification of email resident engineer. Here, Plant_name is the primary key.

    Now, I have this plant's name slipped and dropped like selectonechoice (drop) on page jsff. In this user can select any name of 1 plant drop down.

    Right now, I can go get plant in backing bean name, but I can't understand how business plan for extraction and identification of email of the engineer resident in this key primary-plant_name at the bean to support.

    Please let me know if anyone has an idea in this regard.

    JDeveloper version 11.1.1.6.0

    Thanks in advance.

    Sneha

    Sneha211 wrote:

    On the jsff page

    required = "#{bindings." Plant.hints.Mandatory}.

    shortDesc = "#{bindings." Plant.hints.ToolTip}.

    ID = "soc1" unselectedLabel = "- Select -"

    autoSubmit = 'true '.

    Binding = "#{backingBeanScope.backingbean.plantbean}" > "

    ID = "si1" / >

    In backing bean

    DCBindingContainer = lBindingContainer

    (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();

    DCIteratorBinding lBinding = lBindingContainer.findIteratorBinding("SupplierVO1Iterator");

    NewRow row = lBinding.getCurrentRow ();

    String aamplant1 = (String) newRow.getAttribute ("Plant");

    Hi Sneha, you've written code for it

    you have found the current line and the primary key then this line, then why you not not using this same rank to get the other attributes?

    NewRow row = lBinding.getCurrentRow ();

    String aamplant1 = (String) newRow.getAttribute ("Plant");

    String businessPalnner = (String) newRow.getAttribute ("business_planner"); Returns the value of the same line

    Engineer in String = (String) newRow.getAttribute ("engineer");


    OR if your condition is like that-

    you have a primary key field value, but you do not have the corresponding line, then you can get that line and it's attribute by using the primary key value

    See - http://adfgouravtkiet.blogspot.in/2012/10/filtering-of-data-from-vo.html

    Hope it helps

    -Ashish

  • How to extract the values of column aliases based on different column values?

    Hello gurus,

    I have a table with the following struture-
    "drop table T;
    create table T(Name, Symbol, Amount,dep) as select
    'Anderia', 'AA', 1050000,'HR' from dual union all select
    'Michael', 'ML',150000,'Sales' from DUAL union all select
    'Bill', 'BL', 1050000,'Finance' from dual union all select
    'Nancy', 'NY', 4000,'HR' from DUAL union all select
    'Anderia', 'AA',3000,'HR' from dual union all select
    'Michael', 'ML',1050000,'Sales' from DUAL union all select
    'Bill', 'BL', 1200000,'Finance' from DUAL union all select
    'Anderia', 'AA', 1200000,'HR' from DUAL union all select
    'Vish', 'VH', 1200000,'Marketing' from DUAL;"
    And try to find the values of the column as
    Name, symbol, dep, amount, % Total, Total $Cumm, rank but some additional as-columns

    Amount HR, % HRTotal, $HR Cumm Total,
    Finance amount, FinanceTotal %, $Finance Cumm Total
    Sales amount, a percentage of Total sales, $Sales Cumm Total.
    Amount marketing, MarketingTotal %, $Marketing Cumm Total

    then I use the following query to retrieve the name, the symbol, the dep, amount, % Total, Total $Cumm, rank columns.
    select name
         , decode(grouping(symbol), 0, symbol, 'Total') symbol
         , dep
         , sum(amount) amount
         , sum(per_total) "% Total"
         , decode(grouping(symbol), 0, max(Cum_per_total), null) "% Cumm Total"
         , decode(grouping(symbol), 0, max(rank), null) rank
      from (
              select name
                   , symbol
                , dep
                   , amount
                   , per_total 
                   , sum(per_total) over(order by rk) cum_per_total
                   , rank
                   , rk
                from (     
                        select name
                             , symbol
                    , dep
                             , sum(amount) amount
                             , round((sum(amount)/max(total_amount)) * 100,2) per_total
                             , dense_rank () over (order by sum(amount) desc) as rank
                             , row_number() over(order by sum(amount) desc) as rk
                          from (
                                 select name
                                      , symbol
                                      , amount
                          , dep
                                      , sum(amount) over() total_amount 
                                      , sum(amount) over () 
                                   from t
                               )
                         group 
                            by name, symbol, dep
                    )
            )
      group         
         by grouping sets((name, symbol, dep), ())
      order by rank, max(rk) nulls last
    But I want to extract the following columns so... How can I do?

    Amount HR, % HRTotal, $HR Cumm Total,
    Finance amount, FinanceTotal %, $Finance Cumm Total
    Sales amount, a percentage of Total sales, $Sales Cumm Total.
    Amount marketing, MarketingTotal %, $Marketing Cumm Total


    as I want that all records, then will the dep..do-specific I need to use the case here?
    Thanks for all your time and effort in advance

    If I understand your needs, you need pivot: SQL and PL/SQL FAQ

  • How to extract the value of QVariantlist

    Hello

    I was trying to understand quoteapp example to implement the sqldata in my application. In this example, they are passing all qvariantlist in groupdatamodel and use it in listview. But I don't want to use listview and want to access the value of a particular column in a table on a page. Anyone can guide me please how?

    I'll try to explain what I did to understand how it works. If you have QVarint or QVariantList, right? So now, print it in console with qDebug().

    You will see something like this.

    QVariant(QVariantMap, QMap(("StationButton", QVariant(QString, "") ) ( "StationButtonSelected" ,  QVariant(QString, "") ) ( "StationIcon" ,  QVariant(QString, "0332.jpg") ) ( "StationName" ,  QVariant(QString, "JD Inside") ) ( "StationStreamURL" ,  QVariant(QVariantMap, QMap((".data", QVariant(QString, "http://www.panel-streaming.com/tunein.php/jdinside/playlist.pls") ) ( "type" ,  QVariant(QString, "pls") ) )  ) ) ( "StationURL" ,  QVariant(QString, "http://www.jdinside.com/") ) )  )
    

    So now if I would get Station stream URL type I need to do the following

    QString currType = data.valueQVariantMap>.value("__StationStreamURL__").value ()QVariantMap> ()QString.value("t__ype__").value > ();

    As you can see the first structure is QVariantMap, so we use data.velue() to get it. Then is StationStreamUrl, as QVariantMap and we can get type and convert it to QString. It's something like cabbage, where you need to remove all the layers.

    It will be useful. If not give me what structure you have and I'll try to help you.

    Thank you.

  • How to extract the values inside the jquery element dialogue modal rigion

    Hi all

    My requeriment is

    Click report link open jquey editable modal dialog and display all values with respective ID values.

    1.I used page header HTML code below

    < link rel = "stylesheet" href = " " http://AJAX.googleapis.com/AJAX/libs/jQueryUI/1.7.2/themes/

    "Redmond/jquery - ui.css" type = "text/css" / >

    " < script src =" http://AJAX.googleapis.com/AJAX/libs/jQuery/1.4.2/jQuery.js "> < / script > .

    " < script src =" http://AJAX.googleapis.com/AJAX/libs/jQueryUI/1.7.2/jQuery-UI.js "> < / script > .

    < script type = "text/javascript" >

    $(function() {})

    () $('#ModalForm').dialog

    {

    modal: true,

    autoOpen: false,

    Width: 600

    buttons: {}

    Back: function() {}

    closeForm();

    } ,

    Approve: function() {}

    addPerson();

    },

    Return_For_Correction: function() {}

    addPerson();

    },

    Reject: function() {}

    addPerson();

    }

    }

    });

    });

    function openForm (TrxId)

    {

    Alert (TrxId);

    $s ('P3_x_trx_id', TrxId);

    $('#ModalForm').dialog ('open');

    }

    function closeForm()

    {

    $('#ModalForm_input[type="text"]').val (»);

    $('#ModalForm').dialog ('close');

    }

    function addPerson()

    {

    var ajaxRequest = new htmldb_Get (null, & APP_ID., 'APPLICATION_PROCESS is updateStatus', 0);

    ajaxRequest.add ('P3_status', $v ('P3_status'));

    var gReturn = ajaxRequest.get ();

    If (gReturn)

    {alert (gReturn)}

    on the other

    {ajaxRequest = null;

    closeForm();

    doSubmit ('SEARCH'); }

    }

    < /script >

    2. static html Id - ModalForm region

    3. region html Header-

    < div id = "ModalForm" title = "View details" style = "display: none" >

    4.footer-

    < / div >

    5. in the same page created 'extraction of line auotomatic' process by using the value of key PK P3_trx_id

    6 Jquery modal region is created but not showing values.

    Hi Dan,.

    You must create a separate page for your modal dialog box,

    Call this dialog in the parent page and pass the value modal page in some hidden item and use the value of the element to retrieve details on the modal dialog box.

    1. change your report Page-> under the header HTML

    
    

    2. change the link from which column you want to call the modal dialog box.

    Target: URL

    URL: javascript:f_modalDetails(#ID#);

    instead ID, pass the value that you want to pass to the modal dialog box that shows you the data associated with the selected line.

    3. go to the page of the form (modal dialog)

    Change your close button that closes the modal dialog box.

    Action: Redirect URL

    Target URL: javascript:window.parent.closeModalDialog();

    Close the Model dialog box using the "submit" button press

    4. create a branch on the processing section of the Page of the page of the modal dialog box

    Branch point: After Processing (After computation, validation and Processing)

    Target type: Page of this Application

    Page: Redirect to the same page

    Request: CLOSE_MODAL

    When you press the button: select the Send button

    NOTE: Branch must be before all the unconditional branch on this page

    5. create a dynamic Action on the Page modal dialog box

    Event: Page load

    Action: Run the JavaScript Code

    Code: javascript:window.parent.closeModalDialog();

    Kind regards

    Jitendra

  • How to extract the value of the signature (appearance)

    I asked my users to create an appearance for their signature showing that the 'name' and 'logo '.  I want to create a script to verify this aspect and display an alert if they did not follow the rule to create a signature. the value property indicates the word < < dict > > is it possible to delete a signature via javascript, is it not meet requierments, prevent the signing, forcing an appeareance or just change the appearance by default so that the user should not change?

    No, you can do most of this with JavaScript. You have access to is the data in an object SignatureInfo returned by the field.signatureInfo method:

    http://livedocs.Adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.756.html

    With the field.signatureSetSeedValue method, you can preconfigure a specific field to use a specific named appearance, but I don't know how you would handle this for multiple users because their appearance signature names would be probably different: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.757.html

  • How to extract the value of the element as an array in javascript

    Hi all

    I want to do some calculations on the value entered by the user in the textfield of a tabular presentation, how can I retrieve the value of the element as an array in javascript?

    I use as a normal, do not use in the form of apex_item.

    I can pass the current value of the textfield to the function using 'this' as a parameter, but how can I retrieve the value of other lines of the same column?

    Thank you
    Tauceef

    If it is a page element wouldn't be better to make a calculation of point page when onload of the page? Just do a SQL as select sum (col1) of dual nationality or whatever is your table/column?

  • ID - value in XML format. How to extract the value based on the id?

    Hello

    I have a XML type

    < root >
    < resource >
    < id > 123 / < ID >
    < value > CBA < / value >
    < / resource >
    < resource >
    < id > 456 / < ID >
    def < value > < / value >
    < / resource >
    < / root >

    It is stored in a column of XMLTYPE as a CLOB.

    Now, I want to get a particular value based on one id.

    I tried to use the following syntax

    ([Select case when existsnode(x.XML_CLOB,'/Root/Resource[Id="123"]') = 1
    then extractValue(x.XML_CLOB,'/Root/Resource/Value')

    but "/ Root / / value of resource" can mean either of the 2 values. How to solve this?

    Hello

    If the element 'id' is unique you just specify XPath to the 'value' on the basis of extractvalue (given that you are pregnant of a single node):

    WITH x AS (
     SELECT xmltype(
     '
     123abc
     456def
     '
     ) xml_clob
     FROM dual
    )
    SELECT extractvalue(x.xml_clob, 'root/resource[id="123"]/value')
    FROM x
    WHERE ...
    ;
    
  • How to extract the value of the field in variable

    I want to be able to read the value of the field out of the browser and store in a variable for I can manipulate it. I tried several methods, that which no I can't find the proper syntax. My last is the following:

    . . Solve ("postal code", "/ip/", Source.DisplayContent, 1);

    I assumed that the Group should be able to draw from this, but it does not solve. I think my problem is the regular expression or index (that I had with the null value). Any help would be greatly appreciated as I have a tight deadline to achieve. Thank you.

    -John

    Hi John,.

    Why are you using web.window? Surely, you would use web.element?

    Concerning

    Wayne.

  • How to extract the values of the other tables in the process upon request

    Hi all
    In Oracle Apex 4.1.
    The Leave_transaction Table contains the following fields,
    1.Leave_id
    2.Emp_name
    3.From_date
    4.To_date
    5.Remaining_days
    The Emp_Master Table contains the following columns
    1.Emp_id
    2.Emp_Name
    3.Remaining_days
    Holiday_master table contains a list of the dates of the holidays as 'From_Date '.

    I have the form based on the Leave_Transaction Table,
    I created the process,
    "Sur-Soumettre after calculations and validations of."
    and posted the following PLSQL code,
    declare
    days number(3);
    ex_days emp_master.remaining_days%type;
    new_rem_days emp_master.remaining_days%type;
    begin
    select count(*) into days from (select dt
    from(
        select to_date(:p1_from_date, 'DD-Mon-YYYY') + rownum -1 dt 
            from dual
    connect by level <= to_date(:p1_to_date, 'DD-Mon-YYYY') - to_date(:p1_from_date, 'DD-Mon-YYYY') + 1)
    where to_char(dt,'fmday') not in ('sunday','saturday') minus (select holiday_start from holiday_master)) dual ;
    
     select remaining_days into ex_days from emp_master where upper(emp_name) = upper(:APP_USER);
    new_rem_days := ex_days - days;
    
      update emp_master set
        remaining_days = new_rem_days
        where upper(emp_name) = upper(:APP_USER);
    update leave_transaction set
        remaining_days = new_rem_days
        where upper(emp_name) = upper(:APP_USER) and
         leave_id=(select max(leave_id) from leave_transaction);
    
    end;
    If the date is between from_date and To_date comes Saturday and Sunday or if any Date exists in the table of Hpliday_master he will exclude and return the count (*) rest of dates.
    For example,.

    If the From_date is 04-may-2012'
    and To_date is 08-may-2012,

    Here the dates 5 May and 6 may are "Saturday" and "Sunday".

    and if any date between From_date and To_date is exist in the Table Holiday_Master
    That is to say that here it is 07-may-2012,

    Then the remaining dates are (excluding sat, Sunday and dates in holiday_table).

    04-may-2012,
    08-may-2012.

    the count (*) is 2.

    I use the code above but it return 5.
    I think that this
     
    ...where to_char(dt,'fmday') not in ('sunday','saturday') minus (select holiday_start from holiday_master))
    code does not work.
    Can someone help me solve my problem.

    Edited by: Gurujothi may 3, 2012 23:59
    set serveroutput on;
    declare
    v_sql varchar2(100);
    begin
            v_sql := 'ALTER SESSION SET NLS_LANGUAGE= ''GERMAN''';
            execute immediate  v_sql;
            dbms_output.put_line(v_sql);
            for c in
                        (
                        select to_char(sysdate + level ,'fmday') day_
                        from dual
                        where to_char(sysdate + level,'fmday') not in ('sunday','saturday')  connect by level < 8
                        ) loop
                        v_sql := c.day_;
                         dbms_output.put_line(v_sql);
                        end loop;
    
            v_sql := 'ALTER SESSION SET NLS_LANGUAGE= ''AMERICAN''';
            execute immediate  v_sql;
            dbms_output.put_line(v_sql);
            for c in
                        (
                        select to_char(sysdate + level ,'fmday') day_
                        from dual
                        where to_char(sysdate + level,'fmday') not in ('sunday','saturday')  connect by level < 8
                        ) loop
                        v_sql := c.day_;
                         dbms_output.put_line(v_sql);
                        end loop;
    end;
    /
    
    ALTER SESSION SET NLS_LANGUAGE= 'GERMAN'
    samstag
    sonntag
    montag
    dienstag
    mittwoch
    donnerstag
    freitag
    ALTER SESSION SET NLS_LANGUAGE= 'AMERICAN'
    monday
    tuesday
    wednesday
    thursday
    friday
    PL/SQL procedure successfully completed.
    
  • How to return the value 0 for no data using the County?

    Hi all
    I used this query to count the number of records for each month of the year:

    SELECT DISTINCT COUNT (I.information_sid) COUNT, TO_DATE (TO_CHAR (INSERT_DATE, 'MM'), 'MM') MONTH

    INFORMATION I

    TO_DATE GROUP (TO_CHAR (INSERT_DATE, 'MM'), 'MM')

    ORDER BY TO_DATE (TO_CHAR (INSERT_DATE, 'MM'), 'MM')

    But this code returns no value for months without data
    I want to return the value '0' for any month of data. How, please?

    Note: I use reports 6i.

    Maybe this?

    SELECT SUM(CNT_REC) CNT_REC, MONTH
    FROM
    (
    SELECT COUNT(I.information_sid) CNT_REC, TO_DATE(TO_CHAR(INSERT_DATE,'MM'),'MM') MONTH
    FROM INFORMATIONS I
    GROUP BY TO_DATE(TO_CHAR(INSERT_DATE,'MM'),'MM')
    UNION ALL
    SELECT 0, LPAD(ROWNUM,2,0)
    FROM ALL_OBJECTS
    WHERE ROWNUM <= 12
    )
    GROUP BY MONTH
    ORDER BY MONTH
    

    No need to SEPARATE during the use of GROUP BY.

    -Clément

  • How to get the value of a literal XML node content in BPEL 2.0?

    Hello!

    I have a problem creating A Expression in the distribution of the XML literal one activity, I would like to help me...

    Well, I have the same activity in the 1.0 version of BPEL and is now different is BPEL 2.0,.

    I have a Web Service < WSEjecutaComandos > when having a function of controls remote that connects,

    Entries of my Web Service: "int numEquipo, String [] comandos, int numCta, int publicar, int, String date version"

    The second argument is an array of string type...

    Now in my BPEL process, I do is the following assignment:

    ************************************************************

    < assign the name = "AssignCreaPath" >

    < copy >

    < from >

    < literal >

    " < fnCRexecElement xmlns =" http://Servicios/ ">

    < numEquipo > 2 < / numEquipo >

    < comandos >mkdir etl/entries/mmkis /< / comandos >

    < numCuenta > 1 < / numCuenta >

    < publicar > 0 < / publicar >

    < / fnCRexecElement >

    < / literal >

    < / from >

    < to > $InvokeClear_fnCRexec_InputVariable.parameters < /pour >

    < / copy >

    < copy >

    (< a >concat(ora:getContentAsString($InvokeClear_fnCRexec_InputVariable.parameters/comandos),$inputVariable.payload/client:fecha)< / from >

    < to >$InvokeClear_fnCRexec_InputVariable.parameters/comandos< /pour >

    < / copy >

    < copy >

    < a > $InvokeVersion_fnGetVersionProcesoByFecha_OutputVariable.parameters/version < / from >

    < to > $InvokeClear_fnCRexec_InputVariable.parameters/version < /pour >

    < / copy >

    < copy >

    < a > $inputVariable.payload / client: date < / from >

    < to > $InvokeClear_fnCRexec_InputVariable.parameters/date < /pour >

    < / copy >

    < / assign >

    ***************************************************

    Well the conflict I have is as follows,

    previously defined an entitlement with the XML Fragment copied on the payload to the Web Service (WSEjecutaComandos), input variable

    and the XML code is copied to each of the variables,

    Then him concatenating input values (I noted in red) < comandos > with the value of 'farm' (String), and once again copy Variable < comandos > and has not had any problems

    but now with the new BPEL 2.0, I do the same thing now using literal XML (this good!) but the option to concatenate (that I've noticed in red) and copied to the same variable ( I noticed blue ), I mark the following error message:

    Error1.png

    I should know, I am doing wrong, or you need to to XPath function as the value that they already have the variable < comandos > will concatenate date,

    and is the final value of my entry, my Web Service.

    must be defined as table of values of type < comandos [i] >

    define the following activities before $InvokeClear_fnCRexec_InputVariable.parameters/comandos [1],

    but it seems that this BPEL 2.0 does not respect me in the form of hooks index.

    Thank you...

    See you soon,.

    I found the solution to get the value of an xml element and it concatenated with another variable within a beneficiary.

    is:

    ORA: getNodeValue (ora:getChildElement($InvokeCreaPath_fnCRexec_InputVariable.parameters,2))

    first get the desire here in my tree xml element is position 2 < comandos=""> and then get the value of this node.

    See you soon,.

  • How to extract the users email address if you use AD as LDAP

    LDAP used in my environment is Active Directory.

    I want to send e-mail messages to multiple users. But I do not know how to retrieve the emailAddress for all the Active Directory user name.

    Help, please.

    Hello.

    I got it working... and sharing code.

    private String getIndividualUserEmail (String userId) {}

    String emailAddress = "";

    try {}

    JpsContextFactory ctxf = JpsContextFactory.getContextFactory ();

    JpsContext ctx = ctxf.getContext ();

    IdentityStoreService = storeService

    ctx.getServiceInstance (IdentityStoreService.class);

    IdentityStore idStore = storeService.getIdmStore ();

    SimpleFilter = SimpleSearchFilter

    idStore.getSimpleSearchFilter (UserProfile.USER_NAME,

    SimpleSearchFilter.TYPE_EQUAL,

    userId);

    SearchParameters params =

    new SearchParameters (simpleFilter, SearchParameters.SEARCH_USERS_ONLY);

    SearchResponse sr = idStore.searchProfiles (params);

    System.out.println (SR.getResultCount ());

    While (sr.hasNext ()) {}

    Identity ID = sr.next ();

    Profile UserProfile = id (UserProfile);

    emailAddress = profile.getBusinessEmail ();

    System.out.println ("Email:-" + profile.getBusinessEmail ());

    }

    } catch (JpsException e) {}

    System.out.println ("getIndividualUserEmail: JpsException occurred");

    } catch (IMException e) {}

    System.out.println ("getIndividualUserEmail: IMException occurred");

    }

    return emailAddress;

    }

    Thank you

Maybe you are looking for