Is there a way to avoid the function call ?

Given the following test case
CREATE USER TESTER
  IDENTIFIED BY "tester"
  DEFAULT TABLESPACE USERS
  TEMPORARY TABLESPACE TEMP
GRANT CONNECT, RESOURCE TO TESTER
GRANT CREATE TYPE TO TESTER
GRANT CREATE SESSION TO TESTER
GRANT CREATE PROCEDURE TO TESTER
GRANT CREATE TABLE TO TESTER
GRANT UNLIMITED TABLESPACE TO TESTER
ALTER USER TESTER QUOTA UNLIMITED ON USERS
COMMIT
CONNECT TESTER/tester
CREATE OR REPLACE TYPE TESTER.PATTERN_LIST AS TABLE OF VARCHAR2(1023 CHAR)
SHOW ERRORS
CREATE TABLE TESTER.PARENT_TABLE
   FIELD_ID     NUMBER(10)          NOT NULL,
   FIELD_NAME   VARCHAR2( 255 CHAR) NOT NULL,
   FIELD_PATH   VARCHAR2(1023 CHAR) NOT NULL,
   FIELD_VALUE  VARCHAR2( 255 CHAR)
CREATE TABLE TESTER.CHILD_TABLE
  FIELD_PATH    VARCHAR2(1023 CHAR) NOT NULL,
  MIN_STR_LEN   NUMBER(10),
  MAX_STR_LEN   NUMBER(10),
  PATTERNS      TESTER.PATTERN_LIST
NESTED TABLE PATTERNS STORE AS PATTERN_TABLE RETURN AS VALUE
ALTER TABLE TESTER.PARENT_TABLE ADD (
  CONSTRAINT PARENT_TABLE_PK
PRIMARY KEY
(FIELD_ID))
INSERT ALL
  INTO TESTER.PARENT_TABLE
VALUES (1, 'FIELD_A', '/A', NULL)
  INTO TESTER.PARENT_TABLE
VALUES (2, 'FIELD_AB', '/A/B', '20090731')
  INTO TESTER.PARENT_TABLE
VALUES (3, 'FIELD_AC', '/A/C', '2167')
  INTO TESTER.PARENT_TABLE
VALUES (4, 'FIELD_AC', '/A/C', '1144')
  INTO TESTER.PARENT_TABLE
VALUES (5, 'FIELD_AD', '/A/D', 'XS10')
  INTO TESTER.PARENT_TABLE
VALUES (6, 'FIELD_AB', '/A/B', '20090229')
  INTO TESTER.PARENT_TABLE
VALUES (7, 'FIELD_AD', '/A/D', 'ART')
  INTO TESTER.PARENT_TABLE
VALUES (8, 'FIELD_AD', '/A/D', 'TESTED')
  INTO TESTER.CHILD_TABLE
VALUES ('/A', NULL, NULL, PATTERN_LIST())
  INTO TESTER.CHILD_TABLE
VALUES ('/A/B',   NULL, NULL, PATTERN_LIST(   '[12][0-9]{3}[0][13578]([0][1-9]|[12][0-9]|[3][01])'
                                            , '[12][0-9]{3}[0][469]([0][1-9]|[12][0-9]|[3][0])'
                                            , '[12][0-9]{3}[1][02][3][1]'
                                            , '[12][0-9]{3}[1][1][3][0]'
                                            , '[12][0-9]{3}[0][2][2][8]'
                                            , '([2][048]|[1][26])([02468][048]|[13579][26])[0][2][2][9]'))
  INTO TESTER.CHILD_TABLE
VALUES ('/A/C',   NULL, NULL, PATTERN_LIST(  '[0-1][0-9][0-5][0-9]'
                                           , '[2][0-3][0-5][0-9]'))
  INTO TESTER.CHILD_TABLE
VALUES ('/A/D',   3, 4, PATTERN_LIST('[^0-9]*'))
SELECT * FROM DUAL
CREATE OR REPLACE FUNCTION TESTER.MATCH_PATTERN(p_value IN VARCHAR2, p_patterns IN TESTER.PATTERN_LIST) RETURN NUMBER
AS
v_count NUMBER := 0;
BEGIN
   SELECT COUNT(*)
     INTO v_count
     FROM TABLE(p_patterns)
    WHERE REGEXP_SUBSTR(p_value, COLUMN_VALUE) = p_value;
    RETURN v_count;
END MATCH_PATTERN;
SHOW ERRORS
COMMIT
/the query
SELECT   FIELD_ID
       , FIELD_PATH
       , ERRINDEX
       , FIELD_VALUE
  FROM (
           SELECT   a.FIELD_ID
                  , a.FIELD_PATH
                  , b.PATTERNS
                  , CASE
                       WHEN ((b.MIN_STR_LEN IS NOT NULL) AND ((a.FIELD_VALUE IS NULL) OR (LENGTH(a.FIELD_VALUE) < b.MIN_STR_LEN))) THEN 1
                    END AS ERRINDEX_1
                  , CASE
                       WHEN ((b.MAX_STR_LEN IS NOT NULL) AND ((a.FIELD_VALUE IS NULL) OR (LENGTH(a.FIELD_VALUE) > b.MAX_STR_LEN))) THEN 2
                    END AS ERRINDEX_2
                  , CASE
                       WHEN ((b.PATTERNS IS NOT EMPTY) AND ((SELECT COUNT(*) FROM TABLE(b.PATTERNS) WHERE REGEXP_SUBSTR(a.FIELD_VALUE, COLUMN_VALUE) = a.FIELD_VALUE) = 0)) THEN 4
                    END AS ERRINDEX_4
                  , a.FIELD_VALUE
             FROM            TESTER.PARENT_TABLE a
                  INNER JOIN TESTER.CHILD_TABLE  b ON a.FIELD_PATH = b.FIELD_PATH
          UNPIVOT
             ERRINDEX
             FOR COL IN (ERRINDEX_1, ERRINDEX_2, ERRINDEX_4)
       )gives me ORA-03113: end-of-file on communication channel
If on the other hand, I replace the nested single-row SELECT with the function call like this
SELECT   FIELD_ID
       , FIELD_PATH
       , ERRINDEX
       , FIELD_VALUE
  FROM (
           SELECT   a.FIELD_ID
                  , a.FIELD_PATH
                  , b.PATTERNS
                  , CASE
                       WHEN ((b.MIN_STR_LEN IS NOT NULL) AND ((a.FIELD_VALUE IS NULL) OR (LENGTH(a.FIELD_VALUE) < b.MIN_STR_LEN))) THEN 1
                    END AS ERRINDEX_1
                  , CASE
                       WHEN ((b.MAX_STR_LEN IS NOT NULL) AND ((a.FIELD_VALUE IS NULL) OR (LENGTH(a.FIELD_VALUE) > b.MAX_STR_LEN))) THEN 2
                    END AS ERRINDEX_2
                  , CASE
                       WHEN ((b.PATTERNS IS NOT EMPTY) AND (TESTER.MATCH_PATTERN(a.FIELD_VALUE, b.PATTERNS) = 0)) THEN 4
                    END AS ERRINDEX_4
                  , a.FIELD_VALUE
             FROM            TESTER.PARENT_TABLE a
                  INNER JOIN TESTER.CHILD_TABLE  b ON a.FIELD_PATH = b.FIELD_PATH
          UNPIVOT
             ERRINDEX
             FOR COL IN (ERRINDEX_1, ERRINDEX_2, ERRINDEX_4)
       )the query gives the correct results which should be
FIELD_ID    FIELD_PATH    ERRINDEX    FIELD_VALUE
6           /A/B          4           20090229
3           /A/C          4           2167
5           /A/D          4           XS10
8           /A/D          2           TESTEDIs there a way to do this without the PL/SQL function call and at the same time avoid the ORA-03113 ? Or, have I hit a bug on 11.1.0.7 ?
Many thanks in advance
Best Regards
Philip

I found the Oracle Bug on my own in the end, in the most unlikely of places !
The following code
SELECT   FIELD_ID
       , FIELD_PATH
       , ERRINDEX
       , FIELD_VALUE
  FROM (
           SELECT   a.FIELD_ID
                  , a.FIELD_PATH
                  , CASE
                       WHEN ((b.MIN_STR_LEN IS NOT NULL) AND ((a.FIELD_VALUE IS NULL) OR (LENGTH(a.FIELD_VALUE) < b.MIN_STR_LEN))) THEN 1
                    END AS ERRINDEX_1
                  , CASE
                       WHEN ((b.MAX_STR_LEN IS NOT NULL) AND ((a.FIELD_VALUE IS NULL) OR (LENGTH(a.FIELD_VALUE) > b.MAX_STR_LEN))) THEN 2
                    END AS ERRINDEX_2
                  , CASE
                       WHEN ((b.PATTERNS IS NOT EMPTY) AND ((SELECT COUNT(*) FROM TABLE(b.PATTERNS) WHERE REGEXP_SUBSTR(a.FIELD_VALUE, COLUMN_VALUE) = a.FIELD_VALUE) = 0)) THEN 4
                    END AS ERRINDEX_4
                  , a.FIELD_VALUE
             FROM            TESTER.PARENT_TABLE a, TESTER.CHILD_TABLE b
            WHERE a.FIELD_PATH = b.FIELD_PATH
          UNPIVOT
             ERRINDEX
             FOR COL IN (ERRINDEX_1, ERRINDEX_2, ERRINDEX_4)
       )works as intended i.e. like a charm !
The only difference between the one that gives the ORA-03113 and the above is the way the join is written. The ANSI way (INNER JOIN) fails, the old way (WHERE clause) succeeds.
I will open a SR with Oracle so that it may be recorded and fixed.
Best Regards
Philip

Similar Messages

  • Is there a way to reverse the Function (Fn) Keys on the ThinkPad T540p and Windwos 8.1?

    I recently purchased an I ThinkPad T540p, and install there Windows 8.1 Enterpirse.
    Then I download and install all drivers from lenovo site including upgrade BIOS to version 2.07
    Then I have noticed that the default for  the keys where  F1 and F2, etc. usually are, are now the mute and volume buttons.  To access the F1, F2....F12 keys, you now have to press Fn + your desired F key.  
    Is it possible to reverse the Function keys?  I would much rather press Fn + F1 to mute than have to press press Fn + F1 to access F1.   
    Thanks you in advance.
    Solved!
    Go to Solution.

    Hi,
    Welcome to Lenovo Community Forums!
    Check in BIOS -> config -> Keyboard if there is an option to switch between default and legacy mode.
    If you don’t find that option, you may try the Fn+esc combination that changes the function keys to legacy mode, but when the computer reboots, it might reset back to a default mode and you have to use Fn+esc again.
    Hope this helps!
    Best regards,
    Mithun.
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • Is there a way to Change the Function keys on a bluetooth keyboard for ipad

    I just got kensington wireless keyboard for my ipad 2 but the program that i am using dosent allow me to use the function keys instead for volume, brightness ect.

    I have had to explain often that no pressure is needed. It's a "touch" screen, not a "press" screen. Most people believe they have to push down hard to make some sort of contact.

  • Is there a way to save the "recent calls" log/list?

    I would like to be able to document the calls made to particular clients.  The info I want to document/save is shown on recent calls (newest iPhone).  Is there a way to copy/paste or otherwise capture this information so it can be printed?
    Thanks!

    There's no way to print this from the phone.  You could take screen shots of the recent call list, the email the picture to yourself and print from there.  Also, some (perhaps many) carriers provide your call history when you log into your account on their website, which would give you another printing option.

  • Is there a way to reverse the Function (Fn) Keys on the ThinkPad T440p

    Hi, Do you have a solution for the T440p please.
    Im really confused how this could be allowed to happen!!!
    Function keys have been around for as long as i can remember and make up the basic setup of a pc/laptop.
    Why on earth would someone think its a good idea to swap the less used functions keys around!!
    I mean even the simple ALT + F4 doesnt close my screens, it just turns the microphone on and off!?!?! (This sequence of keys have always closed application and assisted in faster shutdowns etc...  and thats just a very simple example.)
    If it wasnt the fact that this is a Work Laptop i would swap it if there is no fix.
    I would like a fix and i would also like an explanation on the reasons for this change, only because im curious on what factors came into play to make that decision.
    When making these types of changes you MUST have the input from someone that uses a PC otherwise you are only trying to please the people that dont know how to use a pc... you need to stick to the market and go with whats most beneficial for a working setup for business.... for my job, this key change is simply unacceptable as it has screwed up all the normal methods of accessing certain fields, closing apps, plus other shortcuts etc.
    I apologise for the moaning email but ive just got this new laptop and have a lot of work to do so its just really irritating when the buttons im presing is giving me the unexpected outcome.
    Appreciate your help in this matter.
    Moved to correct board and edited Subject line to reflect content.
    Solved!
    Go to Solution.

    Hi Cff7dxp,
    I am glad to hear that your issue has been resolved from the provided troubleshooting steps. Please feel free to post in Lenovo Community Forums if you have any further queries!
    Did someone help you today? Press the star on the left to thank them with a Kudo’s!
    Cheers!
    Hemanth Kumar
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • Is there a way to avoid the disc menus to make an auto play disc in Premiere elements 11?

    Hi,
    I have upgraded from Premiere elements 10 to 11 and found that it is impossible to make a DVD without passing through the - long- procedure of choosing a disc menu.
    In PE 10 it could be done but  I haven't found a way to do this in PE 11 . Very often one want to just try a movie before it is finished and quickly burn a HD disc.
    Does anybody have a good suggestion?

    Hi again Steve.
    I just found the answer on the forum.
    A.T. Romano Oct 17th 2013
    The trick is to go to the Edit Menu/Preferences/General
    and
    place a check mark next to "Show All Do Not Show Again Messages".
    I had eliminated all messages and consequently always got the menu option.
    This seems to  a minor bug that should yet be eliminated.
    Thanks for your help .
    Kind regards,
    Rein

  • Is there a way to flip the pages in a .pdf so that all of the text is readable (in other words all documents are right side up)?  I have Adobe Acrobat X and am using Windows 8.1.

    Is there a way to flip the pages in a .pdf so that all of the text is readable (in other words all documents are right side up)?  I have Adobe Acrobat X and am using Windows 8.1.

    I have a pdf with over 2,000 pages, many of which are sideways.  I do not want to manually flip each one (few are next to each other).  Is there a way to automate the function so that all sideways or upside down text pages are righted?

  • Is there a way to swap the Fn key and left Ctrl key

    Is there a way to swap the functions of Fn key and left Ctrl key on the keyboard. I'm used to other keyboards where the keys are switched and I keep pressing Fn when I want to press Ctrl.  I figure I'll get used to it eventually, but when I use the laptop in a docking station with a regular keyboard the control key is in one spot and undocked with the Lenovo keyboard the function key is there instead, which makes it hard to get used to.
    If not is there a way to disable the Fn + Space bar function that changes the screen resolution. The programs I use use control + space heavily and my screen resolution keeps changing when I don't want it to.
    It's a small thing I know, but very maddening.

    Thanks, I took the survey. It's interesting the questions on there were asking about location of keys like page up and page down. I find the position of those keys are not that important to me because I don't use them that much and don't seem to mind looking at the keyboard to find them. Also they are almost always in different spots depending on whether you are on a desktop or laptop keyboard so I guess I'm used to unconsciously switching depending on which keyboard I'm on.
    But the left control key is one of the most heavily used, at least by developers like me (control+c to copy, control+v to paste, and control+space for code assist, shift + control + f to format code, shift + control + r to find resources, etc...). I have to hit that Ctrl button 1000 times a day. And the key is in the bottom far left corner on every keyboard (desk top and laptop) I've ever seen until now. Having to remember to look down at the keyboard to find the key is proving difficult and I think is actually hurting my productivity. Especially control+space (when you are expecting a popup to automatically complete the line of code you're working on and instead the screen blinks, resizes and your whole editor loses focus it really breaks your flow of thought, so thanks a million for helping me turn off the silly screen zoom feature).
    Hopefully I'll get used to it like with the other keys like page up and page down although I've had the laptop for two weeks and it's proving difficult. If I had know that Thinkpads have this layout and how maddening it would be to get used to it I probably wouldn't have bought it, even though everything else about it is great. It's amazing how such a small thing can become such an irritant.
    Well thanks again, and if anybody from Lenovo engineering is reading this post, my vote is for some bios setting on the T61P that swaps the functions of Fn and Left control key. It would save me a lot of grief anyway.

  • Is there a way to allow DLLs to call sup-application in TestStand?

    Hi,
    I've got a TestStand sequence that calls a DLL function which is generating an EAccess Violation.
    Now this particular function seems to run two seperate sub process of some kind. I can't figure out what they are, but when I run the DLL function in a CVI environment, two items appear on my windows taskbar and then disappear just prior to the function finishing successfully.
    I've been told that TestStand likes to control its environment... my current theory is that the error generated in TestStand during the funciton call has something to do with the function attempting to launch a thread (or some kind of application) and TestStand not allowing it to do so. Is there a way to let the function run mul
    tiple threads without TestStand's permission? Or turning off TestStands control for one step? Or something to that effect?
    I've tried making a DLL wrapper for the DLL function... but it has the same effect since a sub-thread is trying to be created.
    Thanks,
    Marek D.

    Hi Marek D,
    This question appears to be related to another post that you and I were working on before. Does this post -> http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=50650000000800000040520000&UCATEGORY_0=_8_&UCATEGORY_S=0 <- have anything to do with what you are asking now? If it does did you try the suggestion that I mentioned last in the other thread? Your use of the dll in TestStand does not follow the exact same pattern as what you demonstrated in CVI, and this would be a good starting point.
    To answer your question though, no, TestStand does not have a problem with a dll that it loads and invokes functions on trying to spawn new threads. This is a rather common scenario in fact. As I stated before it appears that since th
    e dll is loading fine and TestStand is able to access its functions ok, there is not really a problem with how TestStand interacts with the dll. In fact if there were a specific problem dealing with this dll trying to create additional threads there could indeed be a problem in that its threads are not being managed properly from within inside the dll itself. Trying to guess at how the dll operates is generally a timewaster, unless you know its exact requirements you may never be able to get it to work. It appears that there is either an external dependency you are not taking into account with this particular dll or you are using it improperly in TestStand. Trying my previous suggestion of trying to reproduce the CVI setup exactly is your best bet.
    Jason F.
    Applications Engineer
    National Instruments
    www.ni.com/ask

  • Is there a way to avoid image "compression/downscaling" on the iPad yet??

    Is there a way to avoid image "compression/downscaling" on the iPad yet??
    I'm sick of saving/downloading/transferring images to my iPad, only to find them being downscaled when saved to the device..
    Is anyone aware of a way to change this?? <edited by host> 
    I would very much like my images to remain the original resolution..
    Thanks!

    Nothing has changed. If your camera transfers raw images to the iPad, these are not touched. Copies that work with the iPad's resolution are also created during the transfer. When you sync with your computer the untouched raw images are what get transfered.
    But the iPad is a viewinf device, not a transfer device from computer to computer, so if you sync photos from your computer to the iPad, those are provisioned to the iPad's resolution.

  • I just purchased the I5, and use the same itunes as my wife. All my wifes contacts showed up on my phone. Is there a way to avoid this?

    I just purchased the I5, and use the same itunes as my wife. All my wifes contacts showed up on my phone. Is there a way to avoid this?

    She needs to call the carrier on her old iPhone and have it removed from her account.
    Once she does that you will not be able to use iMessage because that only works Apple to Apple.
    You will need to use something else like Skype instead.
    Allan

  • Is there a way to avoid a iPlanet Messaging Express home user to copy from the email message ( email content ) body and paste on to a local place( it Hard disk, for an ex )?

    Is there a way to avoid a iPlanet Messaging Express home user to copy and paste email body content and avoid attachment deliver attempts?Cause this could grant home users to take ownership of enterprise's documents, sending to them selves and after that, in their own homes, they access Messaging Express, recieve their email with the forbbiden content and then copy and paste to it's own's hard disk.

    It may be possible, but then what would prevent the user from running a "screen grabber" to capture the data. The underlying question that you need to ask is, "Who can you trust?" If you're concerned about confidential documents being stolen/disclosed, then that is where your security starts. If someone can't access a document, they can't E-mail it or transport it elsewhere. Who says they can only use E-mail? Using ftp is more efficient, or a floppy/Zip/Jazz drive could also be used. Trying to "secure" the E-mail client would be like plugging a single hole in a water pipe full of leaks. You have to shut off the water at the source.

  • Is there a way to use the preview in browser function without an Internet connection?

    This morning our cable modem was down and I was making some changes to a page in a Muse site I'm designing. I wanted to preview the changes in a browser, but when I clicked on the Preview button (or clicked on preview in browser), I received a notification that it was checking for an Internet connection and the preview page never completed. Is there a way to use the preview in browser function in Muse without an Internet connection?

    Thanks for getting back to me! When our cable modem went down, we were still connected to Airport Base Station, and perhaps it appeared to Muse that we did have an Internet connection. In any case, we have now received a new cable modem and our network is working again. As you suggested, I disconnected from the network and tried preview in Muse again, and now it seems to be working just fine. Perhaps it was just the circumstances of our network problem this morning. Good to know I can use the Muse Preview function off-line!

  • When I send an email with Mail, I often confuse the account which I'm using. The result is that I send a message with the wrong account! Is there a way to avoid this (for example a reminder before the email is sent)?

    When I send an email with Mail, I often confuse the account which I'm using. The result is that I send a message with the wrong account! Is there a way to avoid this (for example a reminder before the email is sent)?

    Hi, thanks for the answer, I did that already. Unfortunatly this doesn't help me at all, as I often forget to check the menu. For me composing the message is writing the text, the subject, the person to who is addressed and than press "send".
    I often forget to check the "from", and this is a problem because the software select itself one of the accounts.
    Isn't there a way at least to put as a default a blank field instead of one of the accounts? or an account which doesn't work so if I forget to specify the "from" I will be rnotofied that the message can't be sent.
    I guess this could be a rather common problem for many people!
    Thanks
    Sergio

  • Is there any way to block the shutdown of the device is protected by password? This function would help in case of theft with the issue of the find my iphone app.

    is there any way to block the shutdown of the device is protected by password? This function would help in case of theft with the issue of the find my iphone app.

    Device experiences issues, locks up.
    I need to do a reset.
    How would I do that with a pass code lock in place?
    Wait until the battery dies?
    Apple's changes in iOS 7 are smarter.
    "Losing your iOS device feels lousy. Thankfully, Find My iPhone can help you get it back. But if it looks like that’s not going to happen, new security features in iOS 7 make it harder for anyone who’s not you to use or sell your device. Now turning off Find My iPhone or erasing your device requires your Apple ID and password. Find My iPhone can also continue to display a custom message, even after your device is erased. And your Apple ID and password are required before anyone can reactivate it. Which means your device is still your device. No matter where it is."
    http://www.apple.com/ios/whats-new/

Maybe you are looking for

  • Can i transfer apps from one ipod to another ?

    My parents got me an ipod touch 2 years ago but the screen's broken and i wanted to get a new one but i've spent alot of money on apps so i was just woundering if it was possible to transfer my apps onto a new ipod touch ? please help!!

  • Path in ZIP Files

    I have a program that compresses files into a ZIP File. How do you get the data extractable in something like WinZip and how do you get Ride of the Path in WinZip?

  • Help: Hotmail messages won't delete in Mail

    I've had this super annoying problem since I installed Leopard: whenever I receive a message on my hotmail account, it's impossible to delete, and it will keep showing up as unread everytime I throw it in the trash, until I finally delete it in my ho

  • HDMI vs Mini DP vs DVI vs Thunderbolt

    I have a mid-2009 MacBook Pro with 8GB of RAM and a 2.26 GHz processor. When I connect to an external monitor and try to watch videos on youtube or netflix, I get choppy quality. This does not happen on my laptops display even while the external moni

  • HT5691 How long do I have to purchase applecare

    Buying a iPad for my daughter do I need to get the AppleCare now or can I get it after Christmas when she first registers it?