Thanks for the alternative xpath. After 100 runs, the average for /* was 4.149, and the average for /*[1] was 4.148. The first run on each xpath was ~4.7, and the rest were ~4.15. So actually, either one averages out to more than a second faster than the previous methods, which is awesome...
Thanks for the follow up, but that still doesn't compile because NOCOPY is only for IN/OUT or OUT parameters. IN parameters are already passed by reference. http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/08_subs.htm#14867
I changed the insert_node function to a procedure and...
Hi,
I need to append some XML to a vary large XML doc (6.7mb), and it's taking a really long time. For one or two records, it wouldn't be a problem, but I have to do this on hundreds of thousands of records.
Here are the three different ways I've tried so far:
dbms_xmldom:
FUNCTION...
Thank you for your suggestion! Not only is that way more concise and elegant, but the explain plan also shows far fewer steps, lower cost, and lower I/O. I can't thank you enough for your help! That is really awesome! Thanks again!
Hi, I'm writing a query which will grab translations from a table. The rules are that I select the keys with the specific locale first, then I select the keys with the language, finally select the rest in english.
I wrote the query below, but I'm not happy with the 12 step explain plan and cost...
I can print the hex value of a given number using printf
printf "%02x\n" 2 -> 02
printf "%02x\n" 20 -> 14
printf "%02x\n" 200 -> c8
I need to print the hex value of a random number, 0-127, but can't seem to get that working. I tried this:
printf "%02x\n" ${RANDOM}%128
What do I need to do...
Is it possible to detect the calling database that accessed a function over a dblink? I have package on a remote database that needs to detect who called it.
For clarity, consider a remote DB we'll call RDB that has package x and a function main.
On a staging DB, I make this call:
v_return :=...
Thanks Dan. I think that's exactly what I'll do. If the remote code is wrapped in a function, then I will call the function on my side if it hasn't "timed out". I wish I had control to actually stop the request, but this should do the trick. Thanks again for the advice and thought. I really...
no worries, it was worth a shot. I appreciate the help. I added "delete gScript;" but firefox still continues to fetch the script and allows it to run. Any other ideas on how to stop a this script? Is it impossible in Firefox? Thanks again for the help!
Thanks Dan. This works if I'm on the same domain, but what about when the script is coming from another source? I'm trying to prevent a third party script from hanging and making the page look like it's not done loading.
Thanks for the reply, Dan. Yeah, I looked into the jQuery getScript before putting this together, but I don't know how to "kill" the external script if it takes too long. I thought if I added the script element myself, I'd have more control over removing it after the time expired. Any other...
I need to include an external javascript file, but if it takes over 2 seconds, I want to remove it and block it from running. The following code successfully removes and block the external script from running in IE and Chrome, but not Firefox.
Note: jQuery dependency
var gTimeout, gScript...
Hi, I'm having trouble with a simple transformation.
Here is my XML:
<?xml version="1.0" encoding="UTF-8"?>
<translationSet>
<key name="SMCAM1744_TITLE" translator="" translationDate="">
<comment/>
<contextImagePath/>
<text>Camera 1744</text>
</key>
<key name="SMCAM1762_TITLE"...
Found a cleaner way with this:
FUNCTION escape_latin(p_str IN VARCHAR2) RETURN VARCHAR2 IS
v_str VARCHAR2(10000);
BEGIN
SELECT REGEXP_REPLACE(ASCIISTR(p_str), '\\(.{4})', '&#x\1;')
INTO v_str
FROM dual;
RETURN v_str;
END escape_latin;
I need to escape latin characters in an xml doc. Example: "é" is escaped to "é". I thought I could use the ASCII function, but SELECT ASCII('é') FROM DUAL in Oracle gives me 50089.
I coded this as a quick fix, but I'm sure there's a better way.
FUNCTION escape_latin(p_str IN...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.