Strange behavior when searching a phrase using reg exp and dynamic sql

Hi,
I have a strange issue while using dynamic sql for an apex page. I have a requirement to search a string in the database column which is entered by user on a page item. The search process should search the whole phrase only.
I have a query generated dynamically in the back end and use it in a cursor in the stored procedure
  SELECT t.group_cn , t.group_desc, t.group_type, t.partner_organization_id, t.partner_organization
  FROM vr_idm_group t WHERE regexp_like(t.group_desc,'(^|\W)HR Selection & Assignment(\W|$)', 'i')The pl sql code with the dynamic sql statements are below.
   IF p_search_process NOT in ('PARTNER') THEN
      OPEN v_cursor FOR v_sql;
   ELSE
      OPEN v_cursor FOR v_sql USING p_search_id;
   END IF;
   LOOP
      FETCH v_cursor INTo v_obj.group_cn, v_obj.group_desc, v_obj.group_type, v_obj.partner_organization_id,
         v_obj.partner_organization, v_obj.match_count;
      EXIT WHEN v_cursor%NOTFOUND ;
      v_search_array.extend;
      v_search_array(v_search_array.last) := v_obj;
      dbms_output.put_line(v_sql);
   END LOOP;The search works fine if the search string does not contain any special character like &,- etc.
However, if the search string contains any special character, it does not return any thing. This strange issue happens only if I call the procedure from the apex page and the search string contains a special character. (please note that the procedure works fine even from apex if the string does not have a special character). When I debugged this, found that, the cursor does not fetch any rows (it is supposed to fetch two rows) for unknown reason. When I run the query separately, it returns the two rows (in which the column group_desc contains the search string "HR Selection & Assignment") as desired. Also, when I test the procedure in the back end (PLSQL developer), it works fine.
Any idea, what is causing this strange behaviour?
Advance thanks.
Regards,
Natarajan

i don't see anything about a dataProvider.  you're assigning a source for a scrollpane.  scrollpane's don't have a dataProvider property.
anyway, other than arrayRun always being false when that last if-statement executes, what's the problem?  doesn't that movieclip display when that 2nd branch of the last if-statement executes (assuming instance is defined correctly etc)?

Similar Messages

  • Insert into using a select and dynamic sql

    Hi,
    I've got hopefully easy question. I have a procedure that updates 3 tables with 3 different update statements. The procedure goes through and updates through ranges I pass in. I am hoping to create another table which will pass in those updates as an insert statement and append the data on to the existing data.
    I am thinking of using dynamic sql, but I am sure there is an easy way to do it using PL/SQL as well. I have pasted the procedure below, and what I'm thinking would be a good way to do it. Below I have pasted my procedure and the bottom is the insert statement I want to use. I am faily sure I can do it using dynamic SQL, but I am not familiar with the syntax.
    CREATE OR REPLACE PROCEDURE ACTIVATE_PHONE_CARDS (min_login in VARCHAR2, max_login in VARCHAR2, vperc in VARCHAR2) IS
    BEGIN
    UPDATE service_t SET status = 10100
    WHERE poid_id0 in
    (SELECT poid_id0 FROM service_t
    WHERE poid_type='/service/telephony'
    AND login >= min_login AND login <= max_login);
    DBMS_OUTPUT.put_line( 'Service Status:' || sql%rowcount);
    UPDATE account_t SET status = 10100
    WHERE poid_id0 IN
    (SELECT account_obj_id0 FROM service_t
    WHERE poid_type = '/service/telephony'
    AND login >= min_login AND login <= max_login);
    DBMS_OUTPUT.put_line( 'Account Status:' || sql%rowcount);
    UPDATE account_nameinfo_t SET title=Initcap(vperc)
    WHERE obj_id0 IN
    (SELECT account_obj_id0 FROM service_t
    WHERE poid_type='/service/telephony'
    AND login >=min_login AND login <= max_login);
    DBMS_OUTPUT.put_line('Job Title:' || sql%rowcount);
    INSERT INTO phone_card_activation values which = 'select a.status, s.status, s.login, to_char(d.sysdate,DD-MON-YYYY), ani.title
    from account_t a, service_t s, account_nameinfo_t ani, dual d
    where service_t.login between service_t.min_login and service_t.max_login
    and ani.for_key=a.pri_key
    and s.for_key=a.pri_key;'
    END;
    Thanks for any advice, and have a good weekend.
    Geordie

    Correct my if I am wrong but aren't these equal?
    UPDATE service_t SET status = 10100
    WHERE poid_id0 in
    (SELECT poid_id0 FROM service_t
    WHERE poid_type='/service/telephony'
    AND login >= min_login AND login <= max_login);
    (update all the records where there id is in the sub-query that meet the WHERE Clause)
    AND
    UPDATE service_t SET status = 10100
    WHERE poid_type='/service/telephony'
    AND login >= min_login AND login <= max_login);
    (update all the records that meet the WHERE Clause)
    This should equate to the same record set, in which case the second update would be quicker without the sub-query.

  • Strange behavior when Popup LOVs has read-only condition and Bug Report

    Hi,
    I observed an inconsistent behavior of Popup LOVs when the read-only condition is true. In that case the defined lov query is used to map the internal value of the page item to the display value defined in the lov query.
    What is the reason for this behavior? Because if the Popup LOV is in "edit mode" the page item value is just displayed without looking up the display value. The display value is just used for the popup lov. Mapping the value is normally a behavior of the popup key lov.
    -> The result is that different values are displayed if the page item is in edit or read-only mode. That's not really the behavior someone would expect.
    BTW, there seems to be a bug with "Display Extra Values" set to "Yes" in the case read-only is true. If the lookup doesn't return a value it just displays [ ], but because the property is set to yes it should display the value. The Popup Key Lov has the same bug.
    Thanks for bringing some light into that behavior
    Patrick
    Oracle APEX Essentials: http://essentials.oracleapex.info/
    My Blog, APEX Builder Plugin, ApexLib Framework: http://www.oracleapex.info/

    Patrick,
    I've added your comments to a task already in our queue to examine all item types for correct behavior in read-only mode. I've noticed the quirks with display extra values also.
    By the way, still interested in your thoughts re: Re: Bug Report: Images broke when using get_blob_file_src and not authentic .
    Scott

  • Strange behavior when I try to match a mpeg2 video with the menu size image

    hello all,
    got a strange behavior when I try to match a mpeg2 video with the menu size image,
    menu size is 1920 x 1080 (photoshop file)
    mpeg2 video 1920 x 1080 (1second 19 frames)
    the idea is to go from the menu link to the next sub menu with a video as transition, using the same image on the video as the menu and then zooming in (in my case through a door) to end up after the zoom in the next level menu.
    I try to achieve a smooth change from the first play menu picture to the video image into the next level menu picture,
    everything works good but when I watch it on the preview mode on the left and right side of the video it shows a black bar at least 15 to 25 pixel wide, that means the video image appears smaller and it causes a little jump what is preety disturbing and can not be sold as a professional work.
    why encore treats the video size and picture differently?
    it's gratful appreciated if somebody who got experience in a transition I mentioned obove posting any solution,
    thankl you all

    Hi all
    I'm having a very similar problem with Encore. My menu items are distorting (a minor but infuriating squashing top and bottom) when previewed.
    Using Encore,PS,AE CS4
    DVD format SD PAL DV widescreen
    I created 3 menu frameworks and 3 video transistions to link them in AE. On the final frame of each transistion in AE I saved the frame with Composition>Save Frame to> Photoshop Layers. In PS i added the button functionality and saved.
    In Encore I use Dynamic link to import AE transistions as timelines and imported each PS menu twice, once as "menu" and once as an asset.
    When I link the timeline transistions to the menu and preview at the point the menu begins the whole image is squashed. When the next transistion is activated the image returns to its original size.
    Thinking it was the use of PS that was causing the menus to distort I used the menu asset directly in the time line. Obviously no menu functionality but also no distortion. The AE transistion flowed straight into the "menu" just as I expected.
    In the properties panel the menu Aspect Ratio 16:9
    The AE transistions PAR is SD PALwidescreen 1.4587.
    I did try the Blu Ray suggestion above but the same distortion was apparent.
    Any suggestions short of squashing the video to match the menu would be welcomed.
    Thanks

  • TS2611 I re installed my Final Cut express software, now when I go to use my "halo" and "arrow" application I get a message that says the file format is too new for this version of the application.  Anybody have suggestions?

    I re installed my Final Cut express software, now when I go to use my "halo" and "arrow" application I get a message that says the file format is too new for this version of the application.  Anybody have suggestions?

    After install, did you go to  Apple menu > Software Update to update your FCE to the latest version?
    MtD

  • Report using ref cursor or dynamic Sql

    Hi,
    I never create a report using a ref cursor or a dynamic sql. Could any one help me to solve the below issue.
    I have 2 tables.
    1. Student_Record
    2. Student_csv_help
    Student_Record the main table where the data is stored.
    Student_csv_help will contain the all the column names of the Student_record.
    CREATE TABLE Student_CSV_HELP
    ENTRY_ID NUMBER,
    RAW_NAME VARCHAR2(40 BYTE),
    DESC_NAME VARCHAR2(1000 BYTE),
    IN_OUTPUT_LIST VARCHAR2(1 BYTE)
    SET DEFINE OFF;
    Insert into TOA_CSV_HELP
    (ENTRY_ID, RAW_NAME, DESC_NAME, IN_OUTPUT_LIST)
    Values
    (1, 'S_ID', 'Student ID', 'Y');
    Insert into TOA_CSV_HELP
    (ENTRY_ID, RAW_NAME, DESC_NAME, IN_OUTPUT_LIST)
    Values
    (2, 'S_Name', 'Student Name', 'Y');
    Insert into TOA_CSV_HELP
    (ENTRY_ID, RAW_NAME, DESC_NAME, IN_OUTPUT_LIST)
    Values
    (3, 'S_Join_date', 'Joining Date', 'Y');
    Insert into TOA_CSV_HELP
    (ENTRY_ID, RAW_NAME, DESC_NAME, IN_OUTPUT_LIST)
    Values
    (4, 'S_Address', 'Address', 'Y');
    Insert into TOA_CSV_HELP
    (ENTRY_ID, RAW_NAME, DESC_NAME, IN_OUTPUT_LIST)
    Values
    (5, 'S_Fee', 'Tution Fee', 'N');
    commit;
    CREATE TABLE Student_record
    S_ID NUMBER,
    S_Name VARCHAR2(100 BYTE),
    S_Join_date date,
    S_Address VARCHAR2(360 BYTE),
    S_Fee Number
    Insert into Student_record
    (S_ID, S_Name, S_Join_date, S_Address,S_Fee)
    Values
    (101, 'john', TO_DATE('12/17/2009 08:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'CA-94777', 2000);
    Insert into Student_record
    (S_ID, S_Name, S_Join_date, S_Address,S_Fee)
    Values
    (102, 'arif', TO_DATE('12/18/2009 08:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'CA-94444', 3000);
    Insert into Student_record
    (S_ID, S_Name, S_Join_date, S_Address,S_Fee)
    Values
    (103, 'raj', TO_DATE('12/19/2009 08:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'CA-94555', 2500);
    Insert into Student_record
    (S_ID, S_Name, S_Join_date, S_Address,S_Fee)
    Values
    (104, 'singh', TO_DATE('12/20/2009 08:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'CA-94666', 2000);
    Commit;
    Now my requirement is:
    I have a form with Student_record data block. When i Click on print Button on this form. It will open another window which has Student_CSV_HELP.DESC_NAME and a check box before this.
    The window look like as below:
    check_box       DESC_NAME+
    X                   S_ID+
    --                   S_Name+
    X                   S_Join_date+
    X                   S_Address+
    --                  S_Fee+
    X  means check box checked.+
    --  means check box Unchecked.+
    After i selected these check boxes i will send 2 parameters to the report server
    1. a string parameter to the report server which has the value 'S_ID,S_Join_date,S_Address' (p_column_name := 'S_ID,S_Join_date,S_Address');
    2. the s_id value from the student_record block (p_S_id := '101');
    Now my requirement is when i click on run. I need a report like as below:
    Student ID : 101+
    Joining Date : 12/17/2009 08:00:00+
    Address : CA-94777+
    This is nothing but the ref cursor should run like as below:
    Select S_id from student_record block S_id = :p_S_id;
    Select S_Join_date from student_record block S_id = :p_S_id;
    Select S_Address from student_record block S_id = :p_S_id;
    So, according to my understanding i have to select the columns at the run time. I dont have much knowledge in creating reports using ref cursor or dynamic sql.
    So please help me to solve this issue.
    Thanks in advance.

    Plain sql should satisfy your need. Try ....
    Select S_id, S_Join_date, S_Address
    from student_record
    where S_id = :p_S_id

  • Use of calclockblock and dynamic calc cache? what is impact on essbase?

    Hi,
    Please suggest me use of calclockblock and dynamic calc cache?
    When to use which?

    Hello,
    http://docs.oracle.com/cd/E12032_01/doc/epm.921/html_techref/config/calclockblock.htm
    And here you can find the different settings on dyn calc cache:
    http://docs.oracle.com/cd/E12032_01/doc/epm.921/html_techref/config/homecfgl.htm
    good luck!

  • Strange Behaviour when opening pdf files using search results

    Hi
    I have observed inconsistencies between opening a pdf file when in the document library itself (it opens in a browser - good).
    However, when I click on a the same file in my search results having used Search and the Search Centre it opens in the adobe reader.  I would rather it opened in a browser rather than the adobe reader.
    The only difference I can see is that when opening from a document library the url ends in ".pdf", whereas when opening from the search results the url ends in ".pdf#search=<search string>.
    Anybody any ideas ?
    Regards
    Nigel
    Nigel Price NJPEnterprises

    Hi Nigel,
    According to your description, my understanding is that you want to open pdf from search result in browser.
    Firstly , permissive Browser File Handing in Central Administration, you can refer to the link:
    http://social.technet.microsoft.com/wiki/contents/articles/18858.sharepoint-2013-how-to-view-pdf-files-in-browsers.aspx
    Whether you are using OWA for SharePoint 2013. If Office Web Apps is not used for Search results of PDFs, the opening of PDFs in the browser passes the search terms into Adobe. So, if you don’t use OWA, please configure it for SharePoint 2013.
    More information, please refer to:
    http://stevemannspath.blogspot.com/2013/04/sharepoint-2013-pdf-support-and.html
    I hope this helps.
    Thanks,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • Strange behavior when compiled with Visual C++ 2005 Express Edition

    I wrote a program for Berkeley DBXML 2.2.13 on Windows XP that executes a query 5 times and prints out the runtime for each execution. When I run the program using the Debug version of the libraries the queries take about the same time to execute for all 5 executions. When I run the program using the Release version of the libraries the execution time of the queries degrades significantly between each execution. One query takes 2 seconds to execute the first time and 20 to execute the last. I have tried recompiling the Release version without optimization and the strange behavior persists. I have run both the Release and Debug versions several times and gotten the same results, so I doubt it is a program running in the background that is slowing the execution.
    This behavior does not happen when I compile the program under Unbuntu using g++, so I assume it is caused by some flag set in the Release version of Visual C++. Has anyone else experienced this behavior and know what flags I should or should not set?
    Thanks for your time.
    Lauren

    Hi Lauren,
    We've had users experience this before, and it seems to be a bug/"feature" of the default windows heap allocator. Please see this post for a bit more explanation and a solution:
    Re: Performance Issue caused by XmlResults.next().asString();
    John

  • IPad freezes when searching (or after using) Contacts app

    My iPad freezes when searching contacts and sometimes shortly after I've use the Contacts app. The behavior doesn't appear to be predictable, except that the freezing only happens while using or shortly after using the Contacts app. Are there any fixes for this?

    No fixes yet for anything software wise.
    Try a restart. Shut off the iPad by holding the home button and the top right button until you see the shutdown screen. Then turn the iPad on and try the contacts again. You can also try to reset the ipad's software to factory settings and restoring it.
    Do a fresh backup first.

  • Updated to v 4.0.1. when searching. FF says not responding and uses half a gig of memory

    i have been using FF for years. it auto updated to 4.0.1 but now when i open FF. Do a search. as soon as i press enter system ram goes down and FF says not responding. and it uses 500mb RAM + and i have to force close. i have re-installed it and even factory rest my laptop thinking it was that. but Still the problem persists ??? i have gone back to a older version and that is working fine as i am using it to ask this question

    Nothing is working and I can't find the Roboform toolbar. Your lack of direct support is really irritating- a live chat at least would be helpful.

  • Strange behavior when "trying" to burn a disk.

    At least I think this is strange behavior, following the instructions in the help viewer, topic "Backing up your music to a CD or DVD." One thing for sure, it's not burning a disc and it ain't telling me why.
    I select the playlist and click "Burn Disc"
    Requests a blank disc. I insert one.
    Message "checking media"
    after about a minute, the disc ejects
    Message "checking media" displays another 30 seconds
    No other messages displayed.
    What the ??? Shouldn't it at least display an error message??
    Super-Drive information..... from System Profiler
    MATSHITA DVD-R UJ-845C:
    Firmware Revision: DPP9
    Interconnect: ATAPI
    Burn Support: Yes (Apple Shipped/Supported)
    Cache: 2048 KB
    Reads DVD: Yes
    CD-Write: -R, -RW
    DVD-Write: -R, -RW, +R, +RW
    Burn Underrun Protection CD: Yes
    Burn Underrun Protection DVD: Yes
    Write Strategies: CD-TAO, CD-SAO, DVD-DAO
    Media: No
    Using Sony DVD+R discs.
    Mac Mini   Mac OS X (10.4.8)  

    Whoops, sorry, this was while burning a playlist.
    I've also tried some Pleomax CD disks (Samsung), with no luck. I've tried burning directly from iTunes, and from Toast 7.
    Of the types I've tried, the Sony DVD's have been the best for me. Haven't tried many types though. Maybe I can get disks one at a time until I find a brand my burner likes.
    Still, isn't it strange that there is NO error message? It just quits?
    Mac Mini   Mac OS X (10.4.8)  

  • Strange behavior when resizing with 'Selection Tool'

    Hello,
    I have a really strange issue when using selection tool to resize object. I have several rectangles stacked and grouped inside a layer. When I select one of them (either in Layer panel or with Group selection tool) and switch to 'Selection Tool (V)' to resize it, this tool behaves diferently at diferent zoom levels. Only at 200% zoom it behaves as it shoul.. With 100-150% zoom result is diferent - like there's a invisible box around selected object and I'm resizing it.. I've tried to explain the issue in attached image.. Anyone knows why is this happening?
    Thanks.

    - make new document, size 16383x16383px
    - create rectangle any width, hight say 200px (or anything less then 320px for 5% zoom)
    - select rectangle and show bounding box
    - try resizing hight by stretching bounding box
    - this is how same selection looks at diferent zoom levels
    - same zoom level as befor, hight 100px..

  • Strange behavior when performing query

    Hi all,
    I'm getting some odd behavior when doing different kinds of queries and am hoping someone here can help out. I have a database with continuously updated PDML data (http://www.nbee.org/doku.php?id=netpdl:pdml_specification). I am opening anf querying the database from a seperate application. This appears to work fine for certain types of queries, and fails for other types with error messages that don't seem relevant. Specifically, some queries that use the attribute axis as the last leaf seem to get fouled up. Here are some example queries and the results I get:
    First some queries that work:
    Query: "string(collection()[1]/packet[1]/proto[1]/field[1]/@size)"
    Result:
    A valid number
    Query: "collection()//proto[@name='geninfo']/field[@name='len']"
    Result:
    <field name="len" pos="0" show="64" showname="Packet Length" value="40" size="64"/>
    <field name="len" pos="0" show="64" showname="Packet Length" value="40" size="64"/>
    <field name="len" pos="0" show="64" showname="Packet Length" value="40" size="64"/>
    Now some queries that don't work:
    Query: "collection()//packet/proto/field/@size"
    Result:
    Output to stdout - "Transaction specified for a non-transactional database"
    and an Exception with message - "Error: Invalid argument"
    Query: "collection()//proto[@name='geninfo']/field[@name='len']/@name" (notice it's almost identical to above working query except with @name)
    Result:
    Same as above, an stdout about transactions and an exception about invalid arguments
    What I find most interesting is that both errors (the one printed to stdout and the one I get in my exception) don't seem to have anything to do with the problem. I know the transactional stuff isn't messed up because the exact same code works for certain queries. I'm not sure about the "Error: Invalid argument" exception, but it's not very helpful by itself. I'm using the Java library and DBXML version 2.4.16. Anyone have any ideas what's going on?
    Thanks,
    Dave

    As a follow-up, it appears that I just needed to wrap my attributes in the XPath string() function. For example "collection()//packet/proto/field/@size" does not work while "collection()//packet/proto/field/string(@size)" works fine.
    I'm still not sure why it's spitting out an error message to stdout about transactions not being enabled when the only real error is with the query, but at least it's working now.

  • Strange behavior when shutting down - only works once

    Hi there,
    I'm taking advice from around the forum to create a shutdown button for my VI. When the user sends the shutdown command, the loop stops all processes running and turns off all heaters. Then when this is complete it passes a shutdown variable to all loops allowing them to close. This seems to work perfectly once, but when I hit run again and test it again, it fails. If I abort the VI and restart again, the shutdown works. I can't quite figure out what the behavior is doing here.
    Attached is my program, it's a little messy but everything works, and it has to be added to by someone who isn't me, so I tried to keep everything clear and seperate. If anyone's got any ideas as to what is causing this strange behavior I'd love to hear it.
    Thanks,
    Chris.
    Attachments:
    Main VI.vi ‏259 KB

    First of all, your event loop should look something more like this.  Otherwise you won't exit the loop until another event comes through.
    Secondly, I think you are writing to the wrong control here (this is in your timed loop).  I have no clue what is in the subVI, but I don't think it should be looking at the Shutdown PB control.  That control should be in it's event case.  But here you are trying to cause the shutdown event, but you are writing to the wrong control.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    Event Structure issue.png ‏10 KB
    wrong property node.png ‏3 KB

Maybe you are looking for

  • How can i change a frown to a smile

    how can i change a frown to a smile

  • Installing DBMS_XML_SCHEMA_ANNOTATE package

    Hi In solving some issues with recursive xml we installed 11.2.0.2.0. The solution that had been provided included use of dbms_xmlschema_annotate. This didn't seem to be part of the install so we downloaded the utilities from the XMLDB homepage (xdbp

  • Search Usage Report nt authority\iusr

    Hi, There seems to be some nt authority\iusr process account that is being tagged instead of a regular user account to search for  terms in our search application. The search usage log has many entries on this account name along with the other accoun

  • Invalid input settings

    I'm recording multiple tracks of drums going into an Alesis XT20. Out of that I'm digitally into bank B of a MOTU 2408 audio interface. That is going firewire into the pci-424e card and into my G5Quad. I'm also monitoring thru the 2408 via a small mi

  • Diasable the personalize page,prefernce,Home,Logout links in the page

    Hi all, I want to disable the global links(personalize page,preferences,Home,Logout links) in my custom page and i want add a new link/item to that global link section on the top right corner of the page, is it possible if such please explain how t d