Delete in xsql:dml vs xsql:delete-request and returned rows attribute

There is a difference in the number of rows returned between using a delete in xsql:dml vs xsql:delete-request. If I issue a delete via xsql:dml and the row I wish to delete is not in the table, then I get a result with rows equal to 0 as expected. However if I issue a delete via xsql:delete-request and the row I wish to delete is again not in the table, then I get a result with rows equal to 1.
It appears that the value of rows in the response to xsql:delete-request is the number of rows to be processed, ie the number of rows in the posted document, whereas the value of rows in the response to xsql:dml is the number of rows processed in the database.
I'd expect that the result that we want is the number of rows processed in the database. Thus xsql:delete-request should use the rows attribute in the response to reflect the number of rows processed in the database and thus be consistent with xsql:dml, and possibly use another attribute to reflect the number of rows to be processed.
The same problem occurs with an update in xsql:dml vs xsql:update-request.
http://aetius/xsql/demo/dmldelete.xsql?cxn=demo&bind=ename&ename=COMPAQ&sql=delete+from+EMP+where+ENAME+%3d+?
result is
<xsql-status action="xsql:dml" rows="0"/>
where dmldelete.xsql is
<xsql:dml
null-indicator="yes"
connection="{@cxn}"
bind-params="{@bind}"
xmlns:xsql="urn:oracle-xsql">
{@sql}
</xsql:dml>
http://aetius/xsql/demo/reqdelete.xsql?cxn=demo&table=EMP&key=ENAME
where posted document is
<ROWSET><ROW><ENAME>COMPAQ</ENAME></ROW></ROWSET>
result
<xsql-status action="xsql:delete-request" rows="1"/>
where reqdelete.xsql is
<xsql:delete-request
connection="{@cxn}"
key-columns="{@key}"
table="{@table}"
xmlns:xsql="urn:oracle-xsql">
</xsql:delete-request>
Steve.

If you post as an HTML parameter, then you can directly reference the parameter value as either a lexical parameter:
<xsql:dml>
insert into foo(xml_column) values ('{@paramname}')
</xsql:dml>
or as a bind parameter:
<xsql:dml bind-params="paramname">
insert into foo(xml_column) values (?)
</xsql:dml>
I'd recommend the latter since it's more robust to the presence of quotes in the XML that's being posted.
If you post the XML HTTP body, then you'd have to write a custom action handler that called the getPageRequest().getPostedDocument() to get hold of the posted XML Document.

Similar Messages

  • Lync 2013 custom meeting requests and the CustomFooterText attribute

    Hi there,
    I've been playing around custom meeting requests in Lync 2013. I need to automatically add some lines of text for a Lync Meeting request, and have been using the CustomFooterText attribute. Unfortunately, this doesn't seem to support carriage return
    so all the text is dumped onto one line... and looks very messy.
    I've read on one of the posts, that this field supports HTML, and have tried pasting in some HTML codes, but it's still rendered as text in Outlook.
    The only way I've managed to do this is to save the desired output as an image, upload it to a web server, and use the -LogoURL switch instead, which essentially inserts a graphic... not ideal, but works.
    Does anyone know of a way to insert carriage returns into the CustomFooterText?
    Regards, James.
    James Frost

    Hi James,
    I did some research and testing but found no way to add a carriage return to have this text respect the formatting as entered.
    Best regards,
    Eric

  • Deleted mail does not go to trash file and returns to inbox

    I'm running OS 10.6.2 and Mail 4.2. When I delete mail on my MacBook PRO, the message goes away, but doesn't go into my trash file. When I refresh mail, the deleted messages come back. I'm using exchange server, and I have no problems deleting mail from my iPhone or web mail. In addition, I have other mail accounts that allow me to delete mail without any other issues. I've rebuilt my mail database (mailbx - rebuild), and even deleted the mail account and reloaded it from exchange. HELP!

    In that case, if the account in question is an admin account, you would just tack "sudo" on at the beginning:
    sudo rm -rf ~/.Trash
    If the affected account is not an admin account, you need to log in to an admin account and do this:
    sudo rm -rf /Users/theusername/.Trash
    ...where "theusername" should be the name of the user folder with the broken trash.

  • Regarding rate, sales tax and discounts for credit memo request and returns

    Dear  ALL,
    Rate column is not displaying for credit memo request. suppose credit memo should be given due price diifererence
    with referance to billing documnet credit memo request to rised. but if i want to edit rate column is not available.
    how vat and discount has to be captured in case of rate diifferance for credit memo.
    In case of returns will taxes applicable for returns credit memo
    Gl accounts for credit memo same as billing or different GL accounts to be maintained or not
    client has the scenario that if credit memo request has been rised for with referance to billing due to rate differance.
    If customer returns materilas belongs to same billing. so based on the returns order returns credit memo to be rised .
    But how the sap captures exact price of the materila during returns. ie; price modified during credit memo request.
    Thanks & Regards
    ramesh

    HI,
    Remove all the other condition types from the procedure and keep only those which you need.
    Regards
    Abhilash

  • Undo tablespace/redo logs/ DML /DDL/ truncate/ delete

    1st scenario:Delete
    10 rows in a table
    Delete 5 rows
    5 rows in the table
    savepoint sp1
    Delete 3 rows
    2 rows in the table
    rollback to savepoint sp1
    5 rows in the table
    So all DML affected values are noted in the undotablespace and present in the undotablespace until a commit is issued.And also redo logs make note of DML statements.AM I RIGHT??????
    2nd scenario-truncate
    10 rows in table
    savepoint sp1
    truncate
    0 rows in table
    rollback to savepoint sp1 gives this error
    ORA-01086: savepoint 'SP2' never established
    So is truncate [are all DDL statements] noted in the undo tablespace and are they noted in the redologs????????
    I KNOW THAT A DML IS NOT AUTOCOMMIT AND A DDL IS AN AUTOCOMMIT

    When you issue a delete is the data really deleted ?WHen you issue a delete, there is a before image of the data recorded to the undo area. (And that undo information itself is forwarded to the redo.) Then the data is actually deleted from the 'current' block as represented in memory.
    Therefore, the data is actually deleted, but can be recovered by rolling back until a commit occurs.
    It can also be recovered using flashback techniques which simply rebuild from the undo.
    When you issue a truncate is the data really deleted
    or is the high water mark pointer for a datablock lost?The data is not deleted. Therefore there is no undo record of the data 'removal' to be rolled back.
    The high water mark pointer is reset. It's old value is in the undo, but the truncate is a DDL command, and it is preceded and followed by an implicit commit, voiding any potential rollback request.
    I mean you can always rollback a delete and not
    rollback a truncate?Correct - using standard techniques, deletes can be rolled back and truncates can not.

  • How do I get parameter values for xsql:dml

    Hi -
    If I have an xml file like:
    <stuff>
    <arecord>
    <item1> some data </item1>
    <item2> more data </item2>
    </arecord>
    ... more arecords ...
    </stuff>
    and I want to run an xsql script against it sending every "arecord" to a stored procedure by:
    <xsql:dml>
    begin
    my_package.do_something(a_parm, a_parm2)
    end;
    </xsql>
    how do I get the values in the <item1> and <item2> tags for every record into a_parm and a_parm2 in the call to do_something?
    Thanks in advance,
    -- ST

    You need to post your XML file to an XSQL page that uses the:
    <xsql:insert-request>
    action element. You'll need to provide an associated XSLT stylesheet to transform your XML input document into the canonical XML format for the target table.
    Then, you'll get each <arecord> (transformed into <ROW>) inserted into the columns of the target table.
    For example, if your file looks like:
    <stuff>
    <arecord>
    <item1> some data </item1>
    <item2> more data </item2>
    </arecord>
    ... more arecords ...
    </stuff>and your table looks like:
    ITEM1 VARCHAR2
    ITEM2 VARCHAR2Then you'll need to provide a stylesheet that transforms your XML input into the format:
    <ROWSET>
    <ROW>
    <item1>some data</item1>
    <item2>more data</item2>
    </ROW>
    </ROWSET>and then the data will be inserted.
    If the target table is actually a view, then you can create an INSTEAD OF INSERT trigger on your view to do additional custom processing for each row.
    My "Building Oracle XML Applications" book has examples of doing all of this.
    Steve Muench
    Development Lead, Oracle XSQL Pages Framework
    Lead Product Manager for BC4J and Lead XML Evangelist, Oracle Corp
    Author, Building Oracle XML Applications
    null

  • Deletion of data target contents Vs delete overlapping requests

    hi,
         when do we  go for <b>delete overlapping requests</b>? if it is applicable for full load as well as delta load then i would like to first come up with the full load concept, we have the other option called <b>delete data target contents</b> with this we can delete daily full load without going for delete overlapping requests.
    Pls let me know exact difference between DELETE OVERLAPPING REQUESTS FROM INFOCUBE with DELETE DATA TARGET CONTENTS.

    hi
    When you have delta upload twice daily..the date in the previous request and the second request is same....so you might be giving this option to delete the overlap such that data is not loaded twice
    Assign points dont forget
    Regards
    N Ganesh

  • Xsql:dml update... does not get executed?

    I was testing a simple one field update in <xsql:dml> block and getting the following statement:
    <xsql-status action="xsql:dml" rows="0"/>
    What might be the problem?

    The issue is that JDBC returns a row count only for simple DML statements.
    Whenever you use a BEGIN...END block, JDBC doesn't know how many rows your statement has affected.
    If you try the latest XSQL 9.0.2B release, and use:
    <xsql:dml>
    update emp set ename='FORD2' where empno=7844
    </xsql:dml>
    You'll see that it shows one row was affected.

  • Deleting Variable in production system vis Transport request

    Hello,
    I need to delete a variable in production system via Transport request how can we do this?
    Thanks,

    Hi,
    Open the query in BEx in Development system, delete the variable form the query. The pop-up will arise for a new transport request. Capture the query in new request and then transport the same to Production.
    Regards,
    Yogesh.

  • AE: Deleting Initiators which are already tied to request

    Hi All
    Is there a way of deleting initiators which are already tied to requests? We would like clear the system of all initiators if this is not possible is there a way around it! We would like to use attributes assigned to those initiators in new initiators.
    Any assistance will be appreciated!

    Hi there,
    it is possible to delete initiators!
    - find the path the initiator you want to delete is tied to
    - edit the path and check the "detour" box and deactivate the "active" box
    - save the path without an initiator (detours don't need initiators)
    - now you can delete your initiator
    What is not possible is to delete the path (only when deleting the requests with the mentioned script).
    Regards,
    Daniela

  • How could we delete transport request and task(the released one)

    Hello
    We have a released transport task(not request). Transport request is not released.
    How could we delete transport request and task(the released one). Namely we would not like to transport it to production

    Hi, never delete directly in table.
    There are more tables which depends each other...
    Here, you can find nice example how to do it: Help on ABAP: Few Tips for Transport Request Manipulation
    Using program: RDDIT076 and changing status.

  • I have question about dml mechanism. particularly delete statement

    HI,
    I have question about dml mechanism. particularly delete statement
    I learned that SQL statements deal with each row. For example, SELECT statement insert each record(1 row) which matched with term of WHERE into record pool.
    Also I find that UPDATE, INSERT statement insert each record into memory and if that is commited, I/O is generated with disk.
    if so, Do DELETE statements deal with each row which is matched with terms WHERE statements? ortherwise with rownum?
    I hope that I know the mechanism of DELETE statement?
    If the content above which I mentioned is fault, plz point out.
    Thank you for reading this contents.

    Hi,
    leave_for wrote:
    HI,
    I have question about dml mechanism. particularly delete statement
    I learned that SQL statements deal with each row. I'm not sure what you mean.
    SQL statements deal with sets of rows ; there may be 0, 1, 2, 3 or more rows in the set.
    For example, SELECT statement insert each record(1 row) which matched with term of WHERE into record pool.You must mean an INSERT or MERGE statement that includes a query. A plain old SELECT statement doesn't insert anything, or change any table in any way.
    Also I find that UPDATE, INSERT statement insert each record into memory and if that is commited, I/O is generated with disk.That's right. All DML involves some I/O. The I/O may be buffered, so that the DML statement might finish before any disk I/O is actually performed.
    if so, Do DELETE statements deal with each row which is matched with terms WHERE statements? ortherwise with rownum?
    I hope that I know the mechanism of DELETE statement?Sorry; the last couple of lines you wrote are especially confusing.
    When you have a DELETE statement that includes a WHERE clause, such as
    DELETE  emp
    WHERE   deptno = 20;then the set of rows that will be deleted is the same set of rows for which the condition "deptno = 20" is TRUE. Again, that may be 1 row, but if it is, that's mere coincidence. The number of rows in the set may be 0, or it may be 2 or more.
    If ROWNUM is part of the WHERE clause, then ROWNUM will be considered when Oracle decides which rows to delete; if ROWNUM is not part of the WHERE clause, then ROWNUM will play no part in determining which rows are deleted. Remember, as Damorgan mentioned above, ROWNUM is an arbitrary number. There is no built-in order to the rows in any table.

  • Xsql:dml question

    This is what I am trying:
    <?xml version="1.0"?>
    <page connection="egemdev" xmlns:xsql="urn:oracle-xsql">
    <xsql:dml>
    begin
    ord_cancel_pkg.cancel_order('{@order}');
    exception
    when others then raise;
    end;
    </xsql:dml>
    <xsql:query >
    select order_status .....
    from orders
    where order_number = '{@order}'
    </xsql:query>
    </page>
    However, I don't want the query part to work if the dml part raises an exception. How do I do that?

    Best approach is either to use:
    <xsql:ref-cursor-function>
    and invoke a pl/sql stored function
    that calls your pkg.cancel(), then
    returns a REF CURSOR to the query if successful and a null REF CURSOR (or a REF CURSOR to a query like "SELECT 1 FROM DUAL WHERE 1 = 2" in case calling the proc throws an exception.

  • Can i delete the Previous request and create the new request for loading

    Dear Experts,
    I use 0FIGL_V40.Cube in my system. These Cube does not contain delta capability.i mean for every time i wil load Full only.
    Here my question is  the first day  load full load,and second day i want to load the data.But can i delete the previous request and load the data with new request.
    Please guide me .
    Regards,
    Srinivasan.

    Hi Srinivasan,
    I hope the DS itself is not Delta enabled. If so i think you can delete the contents of PSA. This step can be added in the Process chain before actually loading the FULL IP to DS. Then you can include a step to "Delete Entire data from DataTarget" step in the process chain before actually loading the DTP(Can be Delta/FULL. I dont think there is any impact here since both will bring only one request from DS to DataTarget since PSA will have only one request) from DS to Cube.
    Hope it helps!
    Regards,
    Pavan

  • Delete all inactive objects in a Transport Request

    Hi,
    I want to delete all the inactive objects in a transport Request . How can i do this ? I have many inactive objects in a request so i want to delete them first and then transport it . How can i do this . Please help..

    Hi,
      go to transaction se10 click on display individually enter teh request and click display and then you would get the list of all objects in that request so you can check which one are inactive and delete.
    Or you can also go to se80 in the repository browser you can choose inactive objects so it would show all inactive objects for a user from there also you can delete objects.
    Regards,
    Himanshu

Maybe you are looking for

  • Does anyone know how to lock a specific application, such as e-mail in Ipad?

    I have my company email in my Ipad and I want to lock it in order to prevent whoever uses my Ipad to login to my email. Does anyone know how to lock a specific application or it cannot be locked?

  • Is there any way to make your time line layers different colors ?

    Scrolling up & own the time line panel is a bit of a pain trying to find certain objects on the time line.i learn about doing th option click o why ever key it is that allows you to select the item on your stage which highlights the object on your ti

  • How to insert data into Oracle db from MySQL db through PHP?

    Hi, I want to insert my MySQL data into Oracle database through PHP. I can access Mysql database using mysql_conect() & Oracle database using oci_connect() through PHP. Now How can I insert my data which is in MySQL into Oracle table. Both table stru

  • IDoc to IDoc Mapping

    Hi , I am new to SAP PI. We are using B2B scenario in office. We are getting ALE idoc from one system and generating idoc to receiver system inbetween we need to map the fields by using PI. Please help me on this, How to Map the idoc fields in PI? Th

  • Strange Screen Behaviour When Scrolling

    Hi, anyone seen this before? When users have scroll down in a panel, some display elements overlap each oher (see the two screenshots). By scrolling up and down a few times they can get their display back to normal. Saurabh Attachments: overlap.jpg (