SUCH VALUE

I have the following:

DECLARE

v_schema_to_validate varchar2 (2000);

v_request_type varchar2 (2000);

v_property varchar2 (2000);

v_room varchar2 (2000);

v_id varchar2 (2000);

x_htng CLOB: = ' <? XML version = "1.0" encoding = "UTF-8"? >

" < HTNG_ReadRQ xmlns =" http://HTNG.org/2014B "

" xmlns: ota = ' http://www.OpenTravel.org/OTA/2003/05 "" "

" xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance "

EchoToken = "6cfa1ea3-df0f-497f-9aaf-e927fc11affc".

TimeStamp = "" 2010-02 - 12 T 12: 26:47 ""

Version = "1.0".

" xsi: schemaLocation =" http://HTNG.org/2014B ">

< ReadRequests >

< HotelReadRequest HotelCode = "LOL" >

< audit >

< room RoomID = "101" / >

< / audit >

< / HotelReadRequest >

< / ReadRequests >

< Type UniqueID = "14" ID = "123res" / >

< POS >

< ota: Source >

< ota: RequestorID Type = "WIFI" ID_Context = "a" ID = "1" / >

< / ota:Source >

< / POS >

< / HTNG_ReadRQ > ';

l_xmltype XMLTYPE.

BEGIN

l_xmltype: = xmltype (x_htng);

v_schema_to_validate: = l_xmltype.getRootElement () |'. XSD'.

l_xmltype: = xmltype (x_htng) .createschemabasedxml (v_schema_to_validate);

v_property: = l_xmltype.extract('//ReadRequests/HotelReadRequest/@HotelCode').getstringval ();

v_room: = l_xmltype.extract('//ReadRequests/HotelReadRequest/Verification/Room/@RoomID').getstringval ();

v_id: = l_xmltype.extract('//UniqueID/@Type').getstringval ();

-v_request_type: = l_xmltype.extract('//POS/Source/RequestorID/@Type').getstringval ();

Dbms_output.put_line (v_schema_to_validate |) »  '|| v_property | » '|| v_room | » '|| v_request_type | »  '|| v_id);

-dbms_output.put_line (x_htng);

END;

I can't get the value v_request_type: = l_xmltype.extract('//POS/Source/RequestorID/@Type').getstringval ();   

Several bad things here.

(1), recently said here: Re: Re: no schema definition for 'HTNG_ReadRQ' (namespace ") in parent ' / ',.

This is not correct:

"" xsi: schemaLocation = "http://htng.org/2014B"

It should be:

"" xsi: schemaLocation = "http://htng.org/2014B HTNG_ReadRQ.xsd".

in this way, you'll extract the element name root and need to do is:

l_xmltype: = xmltype (x_htng)

It will be automatically based on a schema, but be aware that it is not validating the document.

You must explicitly call schemaValidate() method to do this.

(2) all extraction methods are deprecated.

Use XMLTABLE:

Select HotelCode

RoomID

UniqueID_Type

RequestorID_Type

in...

from xmltable)

XmlNamespaces)

default 'http://htng.org/2014B'.

"http://www.opentravel.org/OTA/2003/05" as "ota")

, ' / HTNG_ReadRQ'

passage l_xmltype

path of HotelCode varchar2 columns (30) "ReadRequests/HotelReadRequest/@HotelCode".

, RoomID varchar2 (30) path 'ReadRequests/HotelReadRequest/Verification/Room/@RoomID '.

, Path of varchar2 (30) UniqueID_Type 'UniqueID/@Type '.

, Path of varchar2 (30) RequestorID_Type 'POS/ota:Source/ota:RequestorID/@Type '.

) ;

Tags: Oracle Development

Similar Questions

  • Consult the Page element values in the dialog box confirm dynamic action

    Hello

    I can return values to the Page item in the dialog box confirm dynamic action.

    I have a dynamic Action and I using the Action - confirm to display the confirmation message. I'm trying to refer point Page P1_EMP_NO say in the Confirmation box as shown below.

    Action - confirm
    Text - * & P1_EMP_NO.* "test123".

    When I have to run so that a dynamic action, confirmation shows only 'test123', the value for P1_EMP_NO is not displayed.

    My question is that we can refer such values as described above OR is there any other way to do it.

    ----
    Thank you
    Deepak

    Hi Deepak,

    You can see no elements in the confirm dialog box.
    You will need to write your own javascript and refer to elements such as dialog box

    $v('P1_EMP_NO') 
    

    Kind regards
    Kees Vlek
    -----
    Company: http://www.orcado.nl
    Blog: http://www.orcado.nl/blog/blogger/listings/69-kvlek
    Twitter: http://www.twitter.com/skier66
    If the answer to question please change replied and mark the appropriate post as correct / helpful.

  • ADF table column display rounded value

    I have a table that I created by dropping a collection on a jspx.
    He has a column of type BigDecimal. for number of records, its value is as 0.3333333333337. This is defined by the external data source. However, there is no sense for the user to see such value in this column. I want to replace this behavior and display a value as 0.33 in this column where it displays the value as 0.3333333333337 and in general that two digits after the comma.
    How is it possible in 11 1 1 5 jdev

    Hello

    You can try these options as well if you want,

    "#1 option: place a component-> operations palette Converter->""on your field of adf table where you want to cut the number and you can set it as current/number/percentage and also give the number of maximum number of digits etc... (this option is appropriate if you do not want to touch your model layer)

    #2 option: change the level ViewObject.
    Go to your view object, select the attribute and go to the tab "User interface tips", select format type = "number" and to format = "#. #;(###.##) ' (or what ever fits for you)"

    Kind regards
    Nuka ravi

    Published by: Nuka Ravi on April 8, 2013 23:22

  • Rotate this result

    Hello experts,

    I am using the PIVOT function on this Recordset:

    Select * from)

    Select as id 125, 1 as colonne_1, 'A' as column_2, column_3 double union of 0

    125, 2, select 'A', 1 Union double

    Select 125, 3, 'A', 3 double Union

    Select 125, 4, 'A', 5 double Union

    Select 125, 5, 'A', 6 double Union

    Select 126, 1, 'B', 0 double Union

    Select the option, 126, 2, 'B', 1 double Union

    Select 126, 3, 'B', 3 double Union

    Select 126, 4, 'B', 5 double Union

    Select 126, 5, 'B', the double 6);

    I want to get 2 lines one for 125 and 126. for example

    ID c1 c2 c3 c1 c2 c3...

    125 1 has 2 0 a 1...

    Is it possible to do it with PIVOT and how. Also, what happened to the tag {code}

    Best regards

    Igor

    Hi, Igor,.

    Before you can rotate, you must know what the output of each line of input column matches.  In many cases (including this one), there is no such value actually stored in the table, but the value can be derived from the table.  In this case, the column number (which I called c_num in the query below) must be derived from colonne_1.  When you see a value like 7 in colonne_1, how do you know if this will be the 1st column of output, or the 2nd, 3rd, 4th or 5th or?  Compared to all other values from colonne_1 for the same id.  If the 7 is the lowest of all these values, then it will go in the 1st column of output; If this is the 2nd lowest, it will go in the 2nd column and so on.  To find out how the value 7 among all other values of colonne_1, use one of the analytical ranking functions, such as DENSE_RANK:

    WITH got_c_num  AS
    (
    SELECT id, column_1, column_2, column_3
    , DENSE_RANK () OVER ( PARTITION BY  id
                   ORDER BY      column_1
           )   AS c_num
    FROM    table_x
    )
    SELECT *
    FROM got_c_num
    PIVOT  ( max (column_1) as c1
           , max (column_2) as c2
           , max (column_3) as c3
    for  g_num  in (1, 2, 3, 4, 5)
    )
    ;
    

    Why do you need to use an aggregate function?  SELECT... PIVOT implicitly groups BY any column that is not part of the PIVOT clause.  In this case, the id is not mentioned in the PIVOT clause, so the effect will be that of GROUP BY ID.  There could be any number of lines in the input data with the same identity values and the value that determines the column (c_num in this query).  In this example of data, it turns out that there is never more than 1 row with the same combination of id and c_num, but who does not know the query.  I must say what to do if there are multiple lines, if this ever actually happens at the request.

  • FRM 40508: cannot insert records

    Hello

    I get this error FRM 40508 in inserting data in any table through form 11 g.
    for example:

    my test table with two columns: id and name

    I wrote a simple insert statement
    Insert test values (: id,: name);
    commit;

    When I run the application and insert values, it displays the error above.

    When I use the errors in the display, it shows that there is violation: ora - 00001 (duplicates)
    However, there is no such value in the database.

    The same scenario is repeated with each painting I have. Help, please!

    Hello

    I was thinking the same thing as Andreas

    Why do you insert yourself when shape does it automatically. You use manual Insertion when you can't do by using the automatic feature of forms.

    Concerning
    SANAE

  • Physical disks in taking snapshots

    I looked at some posts earlier, but I didn't understand about how to take a snapshot of a virtual machine that includes a physical disk.  In my case, the physical disk is a dd image file mounted, well I'm not sure it's important.  I see that I have no option to create a snapshot in the snapshot GUI Manager.  So, I tried vmrun, which seemed to work.  I noted, however, that vmrun created about 40 snapshot files, named in a convention of VMname-000001 - s001.vmdk, VMname-000001 - s002.vmdk, etc.  They each about 320 KB.  I created the capture instant vmrun when the virtual machine has been turned off.  I use 7.0.1 on a host of Win 7 64 and my guest is Win 7 64.  Thank you.

    Hi Jimmy

    as far as I know you always get snapshots in 2 GB slices when you work with physical disks.

    Also 2 gb slices if you create snapshots with snapshotmanager.

    I just did a test using two ways, and both times the VMDK was the same - 2 GB slices.

    If you really really you can manually create the monolithic snapshots of rawdisks - like that

    # Disk DescriptorFile
    version=1
    encoding="windows-1252"
    CID=75ffb14c
    parentCID=495c0932
    isNativeSnapshot="no"
    createType="monolithicSparse"
    parentFileNameHint="rawdisk.vmdk"
    # Extent description
    RW 976773168 SPARSE "rawdisk-000001.vmdk"
    
    # The Disk Data Base
    #DDB
    
    ddb.toolsVersion = "0"
    

    attached to this parent

    # Disk DescriptorFile
    version=1
    encoding="windows-1252"
    CID=495c0932
    parentCID=ffffffff
    createType="fullDevice"
    
    # Extent description
    RW 976773168 FLAT "\\.\PhysicalDrive1" 0
    
    # The Disk Data Base
    #DDB
    
    ddb.virtualHWVersion = "7"
    ddb.uuid = "60 00 C2 9e 98 f0 c1 24-49 4a 2a d1 a9 b4 74 78"
    ddb.geometry.cylinders = "16383"
    ddb.geometry.heads = "16"
    ddb.geometry.sectors = "63"
    ddb.geometry.biosCylinders = "1024"
    ddb.geometry.biosHeads = "240"
    ddb.geometry.biosSectors = "63"
    ddb.adapterType = "ide"
    

    I just found out how to do it-hardcore - very experimental stuff

    -You have a strange disk geometry

    DDB. Geometry.Cylinders = "9767850".

    DDB. Geometry.Heads = "32".

    DDB. Geometry.sectors = '2 '.

    ddb.geometry.biosCylinders = "9767850".

    ddb.geometry.biosHeads = "32".

    ddb.geometry.biosSectors = '2 '.

    I've never seen such values before... If the drive behaves strange I would rewrite her to normal values

    _________________________

    VMX-settings- WS FAQ -[MOAcd | http://sanbarrow.com/moa241.html]- VMDK-manual

  • request to solve a problem

    Hello

    I have a request. In a table, there are 3 columns tel_no, such value, tel_result. I need the value of tel_result of tel_no, of such value. I'll give the example of the sample

    tel_no: = 12345678
    tel_value: = 1234 = 5
    tel_result should be 1234 = 5678

    tel_no: = 98765432
    tel_values: = 98 = 76
    tel_result should be 98 = 765432

    After the equal sign, the remaining tel_no values should be add with tel_value... Please help me,
    SQL> with t as
      2  ( select '12345678' tel_no, '1234=5' tel_value from dual union all
      3    select '98765432', '98=76' from dual
      4  )
      5  select tel_no
      6       , tel_value
      7       , substr(tel_value,1,instr(tel_value,'=')) ||
      8         substr(tel_no, instr(tel_value,'=')) tel_result
      9    from t
     10  /
    
    TEL_NO   TEL_VA TEL_RESULT
    -------- ------ --------------
    12345678 1234=5 1234=5678
    98765432 98=76  98=765432
    
    2 rows selected.
    

    Kind regards
    Rob.

  • Need help for an itemrenderer component data

    I have a datagrid populated by a dataprovider (collection arrayCollection). No question here

    I have a Custom itemRenderer (as a component) dateField and therefore filled very well, no issue there either.

    However I can't seem to find a way to get the data out (it can be changed, so it is no longer the original data). I can get the original data, but not the new data.

    I can't use an event as there are hundreds of lines I need to handle to write to the database. I just want to get all such values as displayed in the datagrid control.

    I want to just loop through the datagrid and pull data, as written in the object to the itemrenderer component. In debug mode, I can see

    event->-> mycustomecomponent-> text-> [legacy] itemrenderer. I can't get to work.

    Any ideas. There has got to be simple, and just miss him I guess.

    In your ItemRenderer, assign the new value once completed editing your data.yourDataFieldHere. This will then allow you to loop through the dataProvider in the main application and get all the required values.

    function onEdit(evt:Event):void {}

    data.yourDataField = evt.currentTarget.text; Or use of any property of the modified element you need here.

    }

    Chris

  • Can I use an alias for parameter such as 'The value of parameter value VI' entry in the palette of models?

    I played with the example Veristand 2015 "Set model Parameters.vi.

    Is it possible to use a parameter alias as the input string to the function 'Set parameter 2D Array Values.vi'? I tried to do this, but get the following error:

    Error 307662 has occurred to define model Parameters.vi > NI_VS ModelManager ExecutionAPI.lvlib: NI VeriStand - Set parameter 2D Array Values.vi

    Possible reasons:

    NEITHER VeriStand: The node is not found in the system.
    =========================
    NOR VeriStand: Could not find expression of parameter

    I am convinced that the alias has been implemented in the system definition correctly.

    If not, what the point of having an alias for parameter? Model workspace calibration controls don't seem to be able to use them. Am I missing something?

    Thanks in advance for any help on this matter.

    The alias parameter access is just for reading.

    To write to the parameter, you ned to use control of Calibration of model or the model parameters Manager API. Alias as the parameter cannot be used to write.

  • Maximum value such as a number or a string

    Hallo,

    I calculated the maximum value of a channel. The next step is to use this value for further computation. My problem is that I can't use this value as a number. It is just a string. I tried with

    ChnPropGet then I got the number. But I can't use it for calculations. Anyone have an idea how I can fix this problem?

    I've attached a screenshot of my script. I use the German version of 12 DIAdem.

    Thanks for the help...

    Hello LePot,

    the properties. The function returns the property in its native type. If you navigate to the maximum property of a channel, it will return the value as a floating point number. You can check this by running the following script:

    (The script assumes that the dataset example is which has a number of Group 3 with a channel named "Res_Schall_1". But your chains should give you the same result with the message box showing "double."

    Dim Maximum
    Maximum = Data.Root.ChannelGroups (3). Channels ("Res_Schall_1"). Properties ('minimum'). Value
    MsgBox (TypeName (Maximum))

    If you ever want to convert a number represented as a string, be careful when you use "CDbl". This VBScript function assumes that the number is formatted by using the language of oyur BONES, especially the decimal setting (in '. 'or', '). If the setting of the operating system does not match the way the number is converted to a string, you have a problem. That's why the offer DIAdem::Str() to go a certain number to string s and Val() to go the opposite direction. Using CDbl can create rellay average errors that are difficult to detect.

    Andreas

  • Select the column of values such as 1 row of values (separated by commas)

    Hi all

    I've got a column of values:

    2062
    2063
    2072
    2073
    etc...

    How to choose these values as a single line (separated by commas)?

    Here is my test scenario:
    select '2062' as bacc from dual 
    union all 
    select '2063' as bacc from dual
    union all 
    select '2072' as bacc from dual
    union all 
    select '2073' as bacc from dual

    http://rogertroller.blogspot.com/2009/10/5-ways-to-aggregate-columns-into-comma.html

    There is an option is missing... the new oracle 11g listagg function

    HTH

  • Get the range of values such as the value of my line

    Hello

    I want one of my column in the table ("for example: column name = ' GVW") appears as below
    {code}
    PBV
    ----------------
    0-> 5
    5. > 10
    10 > 15
    {code}


    The values of the line comes from the table, called report_range_parameters table and it looks like in below

    {code}

    ID group name min_value max_value
    1 gvw_group 0 5 gvw_name
    gvw_group 2 5 10 gvw_name
    3 gvw_group 10 15 gvw_name

    {code}

    Here's my INSERT sample data.
    {code}

    INSERT INTO REPORT_RANGE_PARAMETERS (ID, GROUP, NAME, MIN_VALUE, MAX_VALUE)
    VALUES ('1 ', 'SPEED_GROUP', 'SPEED_NAME', '0', 5')
    INSERT INTO REPORT_RANGE_PARAMETERS (ID, GROUP, NAME, MIN_VALUE, MAX_VALUE)
    VALUES ('2 ', 'SPEED_GROUP', 'SPEED_NAME', '5', 10')
    INSERT INTO REPORT_RANGE_PARAMETERS (ID, GROUP, NAME, MIN_VALUE, MAX_VALUE)
    VALUES ('3 ', 'SPEED_GROUP', 'SPEED_NAME', '10', 15')


    {code}

    How I write a query to get the values of line like below?

    -----------------
    GVW |
    -----------------
    0-> 5
    5. > 10
    10 > 15



    Thank you

    Hello

    SELECT min_value || ' -> ' || max_value AS GVW FROM REPORT_RANGE_PARAMETERS;
    

    Kind regards

    Published by: Walter Fernández on 12 June 2009 20:45

  • If I have floating values such as 6.3 6.7, 6.9, 7.1, 7.2, how can I write a case statement to handle this

    How can I write a case statement if I want a case for x< 1.5;  ="" a="" case="" for="" 1.5=""><= x=""><= 3.7; ="" case="" for ="" 3.7="">< x="">< 7.2.....etc.  ="" my="" input="" is="" a="" floating="">

    Thank you.

    You don't seem to have set rules on inclusion, but I often use the function in the range and Coerce in these cases.

  • How to get values such as 'USER_ID Role1, Role2, 3'

    Hello
    Table contains columns USER_ID and roles.

    Select user_id, USER_ROLES roles;

    Developer of 1001
    1001 analyst
    1001 lead

    I'm looking for output like
    Lead developer, analyst, 1001

    Please guide me.

    Kind regards
    Vincent.

    Like this...

    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as (select 1 as user_id, 'Developer' as role from dual union all
      2             select 1, 'Analyst' from dual union all
      3             select 1, 'Lead' from dual union all
      4             select 2, 'Developer' from dual union all
      5             select 2, 'Analyst' from dual)
      6  -- end of test data
      7  select user_id, ltrim(sys_connect_by_path(role,','),',') as roles
      8  from (
      9        select user_id, role, row_number() over (partition by user_id order by role) as rn from t
     10       )
     11  where connect_by_isleaf = 1
     12  connect by user_id = prior user_id and rn = prior rn+1
     13* start with rn = 1
    SQL> /
    
       USER_ID ROLES
    ---------- ----------------------------------------
             1 Analyst,Developer,Lead
             2 Analyst,Developer
    
    SQL>
    
  • Does not restore the values of form for the restoration of the tab

    Part of my Web site uses a large number of forms on a single page. On the page, you can filter items (each item has its own form) and modify them. One entry looks like this: [name] [select status] [other Select]. Other important things are that the document has an expiration date in 1981 (to apply a page always up to date) and that change the value in the select results in the triggering of an AJAX function.

    It works perfectly, except for one thing. When filtering State id 1, you get back a little of the element. Let's say that the result of the filter are input 5. Change entry #2 status, which triggered an AJAX function. It works very well, but here's the problem: when close the tab and re-opening with Restore tab, select values become disheveled.

    Due to the execution of a fresh copy of the page, the browser will get a new copy of the page. Entry #2 is now gone (I'll keep calling it that, even if she disappeared because of the filter). Now, here's the problem: Firefox is attempting to restore the value to select it. Entry of the status #3 now has the same status of entry #2, #4 a #3 status and so on.

    I managed to solve this problem on other browsers (Chrome, IE) with this little piece of jQuery:
    {$(document) .ready (function ()}
    {$("form[class^='startingformname']").each (function ()}
    This.Reset ();
    })
    });
    It works perfectly, except for Firefox, which seems to ignore the call to reset...

    As this text is quite long, I'll keep my short question: How do you keep Firefox restore the values of the form (preferably: keep them on the selected item in the HTML)? Now, the user always gets a new copy of the page, and Firefox is trying to restore the old values on this page, even though the HTML code has changed.

    I think your two choices is:

    (1) prevent Firefox from page caching, or

    (2) use a different event to trigger your reset function

    As I understand it, the function $(document) .ready jQuery () raises the event DOMContentLoaded (or equivalent, if not supported by the browser). If the tab is cached in its ' cache fast back-forward ", Firefox can not fire this event when the user returns to the tab, just like Firefox does not always raise the load event in such cases.

    Discover the event more described in the following article and see if you can use it to trigger your reset function in Firefox: https://developer.mozilla.org/docs/Using_Firefox_1.5_caching

    Who is?

Maybe you are looking for

  • Sync iBooks iPad iPhone

    iBook syncs with iPad iPhone 6. I tried logging on iTunes on both devices, turn off both devices to log back. I checked my settings of iBooks. What Miss me? Angie

  • Rename the Toshiba Canvio 2 TB

    I'm on a Toshiba Canvio external HARD drive 2 TB on my router (Fritz! Box 7490) as a NAS drive.Unfortunately the disc always presents itself as "TOSHIBA-ExternalUSB3-0-01" in the navigation tree. So far, I have not found a way to rename the device fo

  • Upgrade Windows 10

    Work on the upgrade to Windows 10.  I understand that I must read all my files before proceeding with the upgrade.  Simple question - procedures to decipher? The only thing I found in the help was something on the application of a new model, but clos

  • Email default fields not editable on TMobile blackBerry smartphones

    Have found a new issue after years of adding several e-mail accounts for my BB 8320 Curve - I have personal account of POP3 e-mail that is put in place as an IMAP with wrong username account, account type and applies to bad mail server - when I try t

  • Can I convert keyboard typing writing in Windows Journal?

    Meaning I do not have a Tablet, that I was wondering if I can type on my keyboard, but it comes out as handwritten? THX for the help...