How to use xs:date() in an update query?
I cannot test xs:date attributes in an "update" query. In a "select" query, all work fine.
This is the sample schema:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created with Liquid XML Studio 1.0.8.0 (http://www.liquid-technologies.com) -->
<xs:schema xmlns:tns="http://OracleTest" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="qualified" targetNamespace="http://OracleTest" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="MyComplexType">
<xs:sequence>
<xs:element minOccurs="0" name="FirstChild">
<xs:complexType>
<xs:attribute name="A" type="xs:string" />
<xs:attribute name="B" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="ID" type="xs:string" />
<xs:attribute name="DateAttr" type="xs:date" />
</xs:complexType>
<xs:element xdb:defaultTable="MyElement" name="MyElement" type="tns:MyComplexType" />
</xs:schema>
This is a sample XML document:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created with Liquid XML Studio 1.0.8.0 (http://www.liquid-technologies.com) -->
<tns:MyElement ID="ID1" xmlns:tns="http://OracleTest" DateAttr="2008-03-14" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://OracleTest http://OracleTest.xsd">
<tns:FirstChild A="a" B="b" />
</tns:MyElement>
If I check the DateAttr attribute in a xquery, it works fine:
select xmlquery('declare default element namespace "http://OracleTest"; collection("/Testing")/MyElement[@DateAttr=xs:date(''2008-03-14'')]' returning content).getclobval() from dual
If I execute an update, like this:
UPDATE RESOURCE_VIEW SET RES = deleteXML(RES, '/oraxdbr:Resource/oraxdbr:Contents/Testing/MyElement[@DateAttr=xs:date(''2008-03-14'')]','xmlns:oraxdbr="http://xmlns.oracle.com/xdb/XDBResource.xsd" xmlns="http://OracleTest"')
WHERE equals_path(RES, '/Testing/test1.xml') = 1
I get the error:
SQL Error: ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00607: Invalid reference: 'date'.
31011. 00000 - "XML parsing failed"
Where is the problem?
Thank you!
Mirko
Hi,
Correct me if I'm wrong, but didn't xs:date() came with xpath 2.0?
deleteXML supports xpath 1.0 .
XMLQuery supports xpath 2.0.
That's why the error "Invalid reference: 'date'".
what function supports which version read Re: Which version of XPathAnts
Similar Messages
-
How to use open data set in SAP
Hi SAP Gurus,
Could anyone help, how to use open data set in SAP.
I need to upload a file from Application server (ZSAPUSAGEDATA) to internal table (IT_FINAL).
Thanks & Regards,
Krishnau2026Hi Krishna.
These are the steps you need to follow.
tables: specify the table.
data: begin of fs_...
end of fs_ " Structure Field string.
data: t_table like
standard table
of fs_...
data:
w_file TYPE string.
data:
fname(10) VALUE '.\xyz.TXT'.
select-options: if any.
PARAMETERS:
p_file LIKE rlgrap-filename.
w_file = p_file.
select .... statement
OPEN DATASET fname FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
*OPEN DATASET fname FOR OUTPUT IN BINARY MODE.
LOOP AT t_... INTO fs_....
write:/ .....
TRANSFER fs_... TO fname.
or
TRANSFER t_... TO fname
ENDLOOP.
CLOSE DATASET fname.
Reward points wisely and if you are benefitted or ask for more detailed explanation if problem not solved.
Regards Harsh. -
Hello all,
when i update apps on my iphone they need the ID that i used when i downloaded these apps and i forgot this ID and a make a new ID
How i used the new one to update these apps?
thanksYour device can hold apps from multiple IDs, but to update them you have to swicth identities which is time consuming. If possible use only the one ID. If you need to reset the password for your old ID visit My Apple ID.
tt2 -
How to use Jquery Data Grid in HTML
can anyone please tell me how to use JQuery Data grid in my HTML page with example.
I have one HTML page i want the standard JQuery Data Grid with search and pagination functionality.Guys I have got the solution
thanks a lot
please refer this link for JQGrid
http://www.codeproject.com/Articles/609442/Using-JqGrid-in-ASP-NET -
How to use TRIM DATA in CFFORM?
How to use TRIM DATA in CFFORM? when data is retrieving from
DATABASE. Wanna rtrim and ltrim while spaces.Better to trim those values after the form submission.
Once you put them into form,
user may also makes mistake by hitting space, right?
Also, by trimming all form fields after submission, you will
be sure that your DB is clean... no whitespaces on it.
Well unless someone insert data directly onto it :) -
How to use same Data Type and Length for two fields
How to use same data type and length for two fields when using 'FOR ALL ENTRIES IN' in a select statement? For instance the select queries are :
SELECT bukrs gjahr belnr lifnr budat bldat zlspr dmbtr waers shkzg
FROM bsik
INTO TABLE it_bsik
WHERE bukrs = p_bukrs
AND lifnr IN s_lifnr.
IF it_bsik IS NOT INITIAL.
SELECT belnr gjahr awkey awtyp
FROM bkpf
INTO TABLE it_bkpf
FOR ALL ENTRIES IN it_bsik
WHERE belnr = it_bsik-belnr
AND gjahr = it_bsik-gjahr.
IF it_bkpf IS NOT INITIAL.
SELECT belnr gjahr lifnr xblnr
FROM rbkp
INTO TABLE it_rbkp
FOR ALL ENTRIES IN it_bkpf
WHERE belnr = it_bkpf-awkey+0(10)
AND gjahr = it_bkpf-awkey+10(4).
ENDIF.
ENDIF.
Here it gives an error in the 3rd select query that 'When you use the addition "FOR ALL ENTRIES IN itab", the fields "GJAHR" and "IT_BKPF2-AWKEY+10(4)" must have the same type and the same length.'
Kindly clarify.Hi Saurabh,
Please see the example code that I have developed for you. It will help you solve the problem.
REPORT ZTEST_3 .
tables : BKPF.
data : begin of it_bkpf occurs 1,
belnr type RE_BELNR,
awkey type awkey,
awtyp type awtyp,
gjahr type GJAHR,
end of it_bkpf.
data : begin of it_bkpf1 occurs 1,
belnr type RE_BELNR,
awkey type gjahr, " change the data type
awtyp type awtyp,
gjahr type GJAHR,
end of it_bkpf1.
data : begin of it_rbkp occurs 1,
belnr type BELNR_D,
gjahr type gjahr,
lifnr type LIFRE,
xblnr type XBLNR,
end of it_rbkp.
select belnr
awkey
awtyp
gjahr
from bkpf
into table it_bkpf
where BUKRS = 'TELH'.
loop at it_bkpf.
it_bkpf1-belnr = it_bkpf-belnr.
it_bkpf1-awkey = it_bkpf-awkey+10(4). "Here only append the required length.
it_bkpf1-awtyp = it_bkpf-awtyp.
it_bkpf1-gjahr = it_bkpf-gjahr.
append it_bkpf1.
clear it_bkpf1.
endloop.
select belnr
gjahr
lifnr
xblnr
from RBKP
into table it_rbkp
for all entries in it_bkpf1
where belnr = it_bkpf1-belnr
This is just an example. Change the fields according to your requirement.
Regards
Abhii
Edited by: Abhii on Mar 9, 2011 9:08 AM -
How to use Sql data source from Essbase 9.3.1
Hi All,
How to use Sql data source from Essbase 9.3.1 for ASO cube.Are there any rules and limitations for that.
Do we need to create any data source connection for this purpose. If there please let me know the dteps to create that connection.
RegardsYes you need to create one DSN connection and you have to use DSN name and login details at the time of building/loading of the outline.
Create DSN
Goto Administrative tools -> DataSources (ODBC) and add the DSN name and specify the Server name of SQL and login details and database.
goto data prep editor and click on File Menu and Click on Open SQL option Next window opens.
There you have to enter the details of the DSN connection and SQL query to build/load.
Thanks,
Prathap -
How To use the Task Service to update a task's outCome
Hello EveryBody,
I started with SOA suite 11g two months ago. I am trying all the possibilities to convaince my bosses of this technology.
My problem is how to use the task service to update an outcome. I have already succeeded to create a client of the task query service.
Thank youYou can use Task Service API's to update any properties of a task:
In your case, to update the outcome of the task, you can use the following API:
Task updateTaskOutcome(IWorkflowContext context,
java.lang.String taskId,
java.lang.String outcome)
throws StaleObjectException,
WorkflowException
For more details, look into the following links:
http://download.oracle.com/docs/cd/E17904_01/integration.1111/e10224/bp_workflow.htm#BACHEFDH
http://download.oracle.com/docs/cd/E15523_01/apirefs.1111/e10660/oracle/bpel/services/workflow/task/ITaskService.html#updateTaskOutcome_oracle_bpel_services_workflow_verification_IWorkflowContext__java_lang_String__java_lang_String_
Thanks,
Navaneeth -
How to use cursor data in more than one location in form?
hi all.
is it possible to make cursor as global or public in the form so i can use its data in more than location for testing like in buttons triggers.
for example:
if i declare the following cursor in "WHEN-NEW-FORM-INSTANCE" trigger
CURSOR cur
IS
SELECT ID, NAME
FROM PERSON;how can i use this cursor in other triggers in other buttons in the form?
thankskareem wrote:
now i have the old data- from cursor and the new- from tableNo, you have not. When you open the cursor you get the state of the database at the current SCN.
If you
- open your cursor, fetch the data and close the cursor
- update some data
- open your cursor, fetch the data and close the cursor
you will get the updated data from your cursor the second time (unless your update isn't a uncommited autonomous transaction but I wouldn't go down that route).
You will have to save your data somewhere or you might take a look at flashback: http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/consist.htm#i20759
cheers -
How to use cursor data in more than one location in the form?
hi all.
is it possible to make cursor as global or public in the form so i can use its data in more than location for testing like in buttons triggers.
for example:
if i declare the following cursor in "WHEN-NEW-FORM-INSTANCE" trigger
CURSOR cur
IS
SELECT ID, NAME
FROM PERSON;how can i use this cursor in other triggers in other buttons in the form?
thankskareem wrote:
now i have the old data- from cursor and the new- from tableNo, you have not. When you open the cursor you get the state of the database at the current SCN.
If you
- open your cursor, fetch the data and close the cursor
- update some data
- open your cursor, fetch the data and close the cursor
you will get the updated data from your cursor the second time (unless your update isn't a uncommited autonomous transaction but I wouldn't go down that route).
You will have to save your data somewhere or you might take a look at flashback: http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/consist.htm#i20759
cheers -
How to use Function module generated to update CDHDR CDPOS
Hi,
I have a Z-table, and I want to tracks the value changes in some fields,
the data elements for those specific fields are marked for "Change document".
I created a Change document object using the transaction SCDO and I got the function module.
now can any one tell me how to use these function modules like ( what values need to be passed to function module. what value do we need to pass for OBJECTID,..value for tables ...etc )
I have a custom program to update/delete entries in the custom table so should I use the function module in my custom program to result an entry in CDHDR & CDPOS.
how to display the old value and new values for the fields specified to changes.
Regards,
Nagu.check in SE37
RV_ORDER_FLOW_INFORMATION
SD_SALES_DOCUMENT_READ
SD_SALES_DOCUMENT_READ_POS
SD_DOCUMENT_PARTNER_READ
SD_DETERMINE_CONTRACT_TYPE
SD_SALES_DOCUMENT_COPY
SD_SALES_DOCUMENT_SAVE
SD_SALES_DOCUMENT_ENQUEUE
SD_PARTNER_READ
RV_DELIVERY_PRINT_VIEW
SD_PACKING_PRINT_VIEW
SD_DELIVERY_VIEW
RV_BILLING_PRINT_VIEW
RV_PRICE_PRINT_HEAD
RV_PRICE_PRINT_ITEM
Rewards if useful...........
Minal -
How to use save data in Background by using standard task?
Hi,
I have worked with PD Process for PD. I try to find background process to run after manager approve. I use the standard task 17900108 but it seem does not work. What should I did before I use this standard task?
Please help me out how to use this standard task.
Thanks a lot,
Regards,
VisutHi All,
Thanks for your reply. Actually the key word of my case is I put the class in Program Exit instead of let it blank. The standard task that I use is 17900108.
I can use it to update data now....
But it seem does not update to DPF (Digital Personal File). Anyone has idea why it does not?
Thanks again.
Regards,
Visut -
Hello. I have a big problem and your sony experts are my last chace. Accidentally I have deleted some of my applications from my ps4. In my ps4 storage I have all the saved data from my games and aplications. I do not know how to use the saved data in order NOT TO START each game from the beginning. It should be a way to use the saved data, but I do not know how. It is totally my mistake, BUT PLEASE HELP ME. I need your help. Could you tell me Each step I have to follow in order to continue the games from my last save? It should be perfect. I wait however uyou say, but please help me.
Reinstall your applications.
If they are from the psstore, download them through your library. There is no charge for this, as purchases are linked to the psn account, not the console.
If they are disk games, put the disk in. The game will install, and download any updates.
Start the game, choose continue as normal. -
Using mobile data connection for updates
How can I update my Nokia Lumia 925 using mobile data connection to black software update?
..or see if THIS is of any help... but will be at the cost of erasing all data from the phone.
-
How to use due date in credit management
hi,
i want to calculate my credits according to net due date
how can i use due date in credit management?
thank youNot sure what do you mean by "use due date in credit management".
If you want to calculate due date per billing document, for example, for such as customer statement, you may use "BSID-ZFBDT + BSID-ZBD1T" (Baseline date + Cash disc day 1).
Maybe you are looking for
-
Open VI reference from a static reference
Hello guys, To open VIs dynamically, instead of hardcoding the VI name in a string constant, I do this as shown below to keep a dependency to my VI, so if someone ever delete the VI from the project, move it, rename it, it will create a broken wire s
-
8.1.7 Installation Problems with Windows 2000 Pro
When I download the .zip file from oracle.com and try clicking on the setup.exe file, nothing happens. I checked the application log and turned off all running services and, still, nothing. Any idea what my problem may be?
-
Force Quit Illustrator CS3 on PC
HELP!! I'm working on a PC and every time I try to quit Illustrator CS3, the program delays and does not quit. The only way to get out is to force quit. This is so frustrating. I remember reading something about it on another forum and it mentioned t
-
Not Able to Install Business Content Objects
Dear all: We have installed BW 7.0 Dev environment in our server. Now we are trying to install BI content into BW. But when we moved to "Business Content",we only see several catalogs like technical content, BEx Personalization, BI Trace Tool, instea
-
Paspersist the case of table and col in sql devloper
when i see my tablename col names in sql devloper it shows in capital letter, how can i show them in Pascale case. yours sincerly. Edited by: 944768 on Apr 7, 2013 8:35 AM