Case insensitive search and replace using ASP and Oracle database

I am interested in providing a case insensitive search and replace query in a Active server page. At present data is collected from a html form which passes the text values to a ASP page. The ASP page runs a search (select query) to find if the data is already in the Oracle database, if it isn't the ASP page runs sql (INSERT) to insert the record, if not the page returns a form indicating that the record already exists. At present we can convert the case of new records using the VB UCase() function. But can't do a insensitive search with the existing records. *The Query must be able to utilize ASP variables.
Any help would be much appreciated.
David Cheryk
null

I can't check your script right now since I'm not on Mac. I recommend you to use FindChangeByList script for CS4 instead (it works with CS3): http://forums.adobe.com/servlet/JiveServlet/download/2080627-12695/FindChangeByListCS4.zip together with Martin Fisher's: http://www.kasyan.ho.com.ua/downloads/RecordFindChange_CS3_Kas.zip
Use this script to record settings from Text and GREP tabs, then copy and paste them into FindChandgeList.txt file.
Or, optionally you can use this script: http://www.kasyan.ho.com.ua/find_change_by_queries.html.
Kasyan

Similar Messages

  • Case-insensitive Search with Search Form

    I am using a Search Form with a UIX Page. One of the issue that need to be resolved is to be able to do case-insensitive search for text information stored in some database columns. Please advise me how to implement case_insensitive search with JDeveloper's Search Form.
    Thanks in advance,

    Hi Qian,
    This article (below) by Steve Muench explains how you can customize Query by example behaviour of ADF BCs and if you really want, how to create your own ViewCriteriaAdapter (but you don't have to go quite that far - luckily :) ).
    http://radio.weblogs.com/0118231/2005/02/10.html#a492
    Here is what I did. I implemented the following method in my base view object class (MyBaseViewObject). Note that this code is based on a piece of code that Steve posted on his blog (http://radio.weblogs.com/0118231/stories/2003/07/11/implementingAViewCriteriaAdapterToCustomizeQueryByExampleFunctionality.html); originally an example about creating your own ViewCriteriaAdapter.
    Since applyViewCriteria(oracle.jbo.ViewCriteria) is used by the query-by-example mechanism you're able to "intercept" the ViewCriteria on "it's way in". After that the standard ViewCriteria does it's job as ususal and generated the where clause when required.
    public void applyViewCriteria(ViewCriteria vc)
         if( null == vc || vc.size() == 0 ) super.applyViewCriteria(vc);
         ViewCriteriaRow criteriaRow = (ViewCriteriaRow)vc.first();
         StructureDef def = criteriaRow.getStructureDef();
         AttributeDef[] attrs = def.getAttributeDefs();
         System.out.println(getClass().getName() + ": applyViewCriteria()");
         boolean bFirst = true;
         do{
           if(vc.hasNext() && !bFirst) criteriaRow = (ViewCriteriaRow)vc.next();
           criteriaRow.setUpperColumns(true);
           for (int j = 0, attrCt = attrs.length; j < attrCt; j++)
             String criteriaAttrVal = ((String)criteriaRow.getAttribute(j));
             if (criteriaAttrVal != null && !criteriaAttrVal.equals("") && !JboTypeMap.isNumericType(attrs[j].getSQLType()))
              criteriaRow.setAttribute(j,criteriaAttrVal.toUpperCase());
           bFirst=false;
         }while(vc.hasNext());
         super.applyViewCriteria(vc);
    NOTE that doing this makes all your views case insensitive (to vc search) you may want to implement more functionality in your base view object to set whether a view is in case insensitive mode or not.
    ALSO that flag will not be passivated (if I remember correctly - someone correct me if I'm wrong) so you'll have to add that flag to the passivated data.
    Cheers!
    Sacha

  • Case insensitive search in CAF?

    Is it possible to do case insensitive search in CAF using QueryFilter? By default it does case sensitive searches in data elements of Entity Services. I am using 7.0.

    Hi,
    Unfortunately the answer is NO.
    Regards,
    Ashutosh

  • Case insensitive search and "IN" Clause in Open SQL

    Hi,
    I have some doubts regarding Open SQL:
    - Is there any support for Case Insensitive Search in Open SQL, is it availabe by default?
    - Is there any restriction on number of elements in "IN" Clause, in Open SQL, is there any default number?
    I have checked the [Open SQL Grammer |http://help.sap.com/saphelp_nwce711/helpdata/en/9b/f46cabaa874bc9a82234e8cf1d0696/frameset.htm]also, but nothing found there.
    Thanks,
    Piyush
    P.S I didn't find any other appropriate place to post this thread, let me know the correct categorization of Open SQL in case its wrong.

    > I have some doubts regarding Open SQL:
    I believe that you've questions and not doubts...
    > - Is there any support for Case Insensitive Search in Open SQL, is it availabe by default?
    Nope, there is nothing like that. By default all supported database use a bytewise equal operator - case insensitivness needs to be programmed by hand.
    E.G. using UPPER(x)/LOWER(x) functions.
    Be aware that this disables the possibilities of index usage.
    > - Is there any restriction on number of elements in "IN" Clause, in Open SQL, is there any default number?
    Yes, there is a restriction and it differes between the different DBMS.
    Until recently you could have 2000 variables per statement with MaxDB.
    The current versions of DBSL and MaxDB Kernel now support up to 10000 variables per statement.
    Anyhow, in most cases, such a long in list can and should be avoided by using the FOR ALL ENTRIES construct. With this, the DBSL automatically splits the long IN list into smaller chunks and executes the statements several times.
    This is invisible to the ABAP report - it just gets the result set as usual.
    > P.S I didn't find any other appropriate place to post this thread, let me know the correct categorization of Open SQL in case its wrong.
    I guess in anyone of the DB forums is Ok.
    regards,
    Lars

  • Catalog manger "search and replace " using xml script

    Hi ,
    we have renamed 6 rpd columns names in rpd & alias is not removed yet .In catalog manager i can search and replace using string .But it takes lot time as they are stored in different reports , which are existing . I am trying to use xml script for replacing them.I got sample script from help file for single column . can anyone help for doing that for multiple strings.I will provide with my inputs .
    my inputs:
    <?xml version="1.0" encoding="utf-8"?>
    <actions>
    <action command="textReplace" oldValue="column 1 " newValue="column one" ignoreCase="true"/>
    <action command="textReplace" oldValue="column 2" newValue="column two" ignoreCase="true"/>
    <action command="textReplace" oldValue="column 3" newValue="column three" ignoreCase="true"/>
    </actions>
    please correct me .

    Given xml content looks okay but just in case check this oldValue="column 1 ", there is additional space at the end.
    I would suggest to extract Analysis report (.csv) using Catalog Manager and find out the list of reports based on those columns.
    This would help you learn with list of reports based on report owners, and then go for the fixing those reports.
    If you go by xml replace you never know the affected reports and you may not confirm until report owners come back to you with issues.
    This might take little bit time but your changes based on proper doc.
    Let me know updates, if helps mark
    Edited by: Srini VEERAVALLI on Feb 19, 2013 3:21 PM

  • Multi search and replace using excel file

    I am trying to use a script to open multiple indesign files and perform several find and replaces using a delimited word file containing the searches, this script, plagerised from a quark one, opens files but doesnt S&R, can anybody see the error of my ways?
    -- Indesign docs
    set QFolder to "Please locate the folder containing your Indesign documents..."
    set Doc_Folder to (choose folder with prompt QFolder) as text
    set theFiles to {}
    tell application "Finder"
    tell folder Doc_Folder
    repeat with i from 1 to count of files
    if file type of file i is "IDd5" then
    set end of theFiles to file i as text
    end if
    end repeat
    end tell
    end tell
    -- Search Items
    set QFile to "Please locate your Tab Delimited Text file..."
    set Search_File to (choose file with prompt QFile) as text
    set Search_Rows to read file Search_File using delimiter {return}
    set Search_Items to {}
    repeat with This_Row in Search_Rows
    set end of Search_Items to my GetTextItem(This_Row as text, tab, 0)
    end repeat
    --Process
    tell application "Adobe InDesign CS3"
    activate
    --Clear the find/change preferences.
    repeat with oneFile in theFiles
    open file oneFile
    set find text preferences to nothing
    set change text preferences to nothing
    --Set the find options.
    set case sensitive of find change text options to true
    set include footnotes of find change text options to true
    set include hidden layers of find change text options to false
    set include locked layers for find of find change text options to true
    set include locked stories for find of find change text options to true
    set include master pages of find change text options to true
    set whole word of find change text options to true
    tell document 1
    repeat with ThisPair in Search_Items
    set {searchstring, replaceString} to ThisPair as list
    tell every story
    try
    set (every text where it is searchstring) to replaceString
    end try
    end tell
    end repeat
    end tell
    close document 1 saving yes
    end repeat
    end tell
    on GetTextItem(ThisString, ThisDelim, ThisItem)
    -- ThisString -> String to look in
    -- ThisDelim -> Text element that delimit the string
    -- ThisItem -> Number of the element to return (0 for all)
    copy the text item delimiters to OldDelims
    set the text item delimiters to ThisDelim
    if class of ThisItem is list then
    set fromItem to (item 1 of ThisItem) as integer
    set toitem to (item 2 of ThisItem) as integer
    set arrItem to (text items fromItem thru toitem of ThisString)
    else
    set arrItem to every text item of ThisString
    end if
    set the text item delimiters to OldDelims
    if class of ThisItem is list then
    return arrItem as text
    else
    if ThisItem is not equal to 0 then
    return (item ThisItem of arrItem) as text
    else
    return arrItem -- return every items
    end if
    end if
    end GetTextItem
    Thanks

    I can't check your script right now since I'm not on Mac. I recommend you to use FindChangeByList script for CS4 instead (it works with CS3): http://forums.adobe.com/servlet/JiveServlet/download/2080627-12695/FindChangeByListCS4.zip together with Martin Fisher's: http://www.kasyan.ho.com.ua/downloads/RecordFindChange_CS3_Kas.zip
    Use this script to record settings from Text and GREP tabs, then copy and paste them into FindChandgeList.txt file.
    Or, optionally you can use this script: http://www.kasyan.ho.com.ua/find_change_by_queries.html.
    Kasyan

  • Case Insensitive search and "IN" Clause - Open SQL

    Hi,
    I have some doubts regarding Open SQL:
    Is there any support for Case Insensitive Search in Open SQL, is it availabe by default?
    Is there any restriction on number of elements in "IN" Clause, in Open SQL, is there any default number?
    I have checked the [Open SQL Grammer|http://help.sap.com/saphelp_nwce711/helpdata/en/9b/f46cabaa874bc9a82234e8cf1d0696/frameset.htm] also, but nothing found there.
    Thanks,
    Piyush
    P.S I didn't find any other appropriate place to post this thread, let me know the correct categorization of Open SQL in case its wrong.

    Is there any support for Case Insensitive Search in Open SQL, is it availabe by default?
    When you are querying any strings, it is always case sensitive.
    Is there any restriction on number of elements in "IN" Clause, in Open SQL, is there any default number?
    I don't think there area any. IN opearator works like combined ORs and here you don't have any restrictions in fields number.
    Regards
    Marcin

  • Support for Case Insensitive Search and IN Clause in Open SQL

    Hi,
    I have some doubts regarding Open SQL:
    - Is there any support for Case Insensitive Search in Open SQL, is it availabe by default?
    - Is there any restriction on number of elements in "IN" Clause, in Open SQL, is there any default number?
    I have checked the [Open SQL Grammer |http://help.sap.com/saphelp_nwce711/helpdata/en/9b/f46cabaa874bc9a82234e8cf1d0696/frameset.htm]also, but nothing found there.
    Thanks,
    Piyush
    P.S I didn't find any other appropriate place to post this thread, let me know the correct categorization of Open SQL in case its wrong.

    No cross posting.
    Read the "Rules of Engagement"
    Regards
    Juan

  • Phonetic and case insensitive searches in Oracle

    Hi,
    Do you know if Oracle 9i allows phonetic searches ? I've found several solutions for case insensitive searches, but I'd need phonetic searches too (like 'había' vs. 'havia' vs. 'habia', etc)
    Any comment would be really welcome.
    Thanks in advance,
    Juan

    lookup soundex in the SQL Reference guide.

  • I have Microsoft Office 2008 and only use Word and Excel. It takes 980 mb. I am considering replacing it with Apple iWorks 2013. If I do, can I delete Office, and still access and modify my Word and Excel documents?

    I have Microsoft Office 2008 and only use Word and Excel. It takes 980 mb. I am considering replacing it with Apple iWorks 2013. If I do, can I delete Office, and still access and modify my Word and Excel documents?
    I have a MacBook Air and OS 10.9.4

    Ron
    Just adding to what CSound has said.
    Pages and Numbers will change Word and Excel documents when they open and close them.
    Sometimes the change is subtle and sometimes not. With the latest versions of Pages and Numbers, more likely not.
    So don't think you are going to work with MsOffice files without problems. You will always have something not right and in some cases really annoyingly not right. Like having all the text from Pages appear bold in MsWord, or page breaks in the wrong place or some objects and graphics not appearing in one or the other.
    If working between different Operating Systems and MsOffice files, I also recommend LibreOffice. It opens and saves nearly all file formats. Unfortunately not .pages or numbers. Yet. The folks at LibreOffice are busy adding to it all the time, and making sure it works in all Operating systems, Mac, Windows and Linux and they are promising iOS as well soon.
    Peter

  • Multiple Forms in a Flash Document and Posting Using ASP

    Hello everyone!
    I have some what of a dilemma on my hands. I am creating
    multiple forms in one document using Flash and need them to post
    using ASP script. I have been researching this for the last six
    days, and I have had NO luck. I have noticed that all the
    information that I have found is for one form, not more than one.
    What I have so far is the Flash document, with 4 forms. The
    basic idea is that a user chooses from a drop down menu (the
    combobox) a location, and depending on the location chosen, it
    takes the user to another frame in the flash document. The forms
    (all their own movie clip) contains a name field, a department
    field, and either a manager name a userID field or an employee
    number as well as the basic buttons for submitting the form or
    resetting the form.
    So far what I have working is the drop down menu (combobox)
    taking me to the proper frame and it shows the appropriate form.
    The reset button clearing the form (deleting any information that I
    have imputed into the input fields), but I have absolutely NO idea
    how to get the submit button to work (I did manage to get it to
    send me a message if there was nothing in one of the input fields),
    and NO idea how to get the information to the ASP file.
    Where there are 4 forms do each of them have to have their
    own ASP file attached to them, or can I use one?
    If anyone knows a site that deals with multiple forms in one
    SWF and posts using ASP that would be greatly appreciated, or if
    you know some actionscript that could be helpful.
    Thank you all in advance.

    That would be part of my problem, I really don't know ASP,
    and I am flying by the seat of my pants.
    The current script I have for the ASP file is:
    <% @Language = "VBScript" %>
    <%
    Option explicit
    Dim strfullName
    Dim strdeptName
    Dim strmanagerName
    Dim strobjeemail
    Dim strlocation
    strfullName.Request.Form("fullName_txt")
    strdeptName.Request.Form("deptName_txt")
    strmanagerName.Request.Form("managerName_txt")
    strlocation.Request.Form("locationName")
    Set strobjemail = CreateObject("CDO.Message")
    strobjemail.From = "[email protected]"
    strobjemail.To = "[email protected]"
    strobjemail.Subject = "Program from " + strlocation
    strobjemail.Body = "This user has completed this progrmam
    from " + strlocation & Chr(13) & Chr(10) & "Name: " +
    strfullName & Chr(13) & Chr(10) & "Department: " +
    strdeptName & Chr(13) & Chr(10) & + "Manager: " +
    strmanagerName
    strobjemail.Send
    Set strobjemail=nothing
    %>
    The AS code that I have so far is:
    function formValidationChecks(){
    if (fullName_txt.length==0){
    status_txt.text = "Please enter your Name";
    else if (deptName_txt.length==0){
    status_txt.text = "Please enter your Department";
    else if (managerName_txt.length==0){
    status_txt.text = "Please enter your Manager";
    else {
    status_txt.text = "Thank You!";
    variables.fullName_txt = fullName_txt.text;
    variables.deptName_txt = deptName_txt.text;
    variables.managerName_txt = managerName_txt.text;
    varLoader.load(varSend);
    trace("-----");
    trace("Name: "+fullName_txt.text);
    trace("Department: "+deptName_txt.text);
    trace("Manager: "+managerName_txt.text);
    trace("Form validated");
    submit_btn.onRelease = function(){
    status_txt.text = "";
    if(formValidationChecks()){
    var lv = new LoadVars();
    lv.fullName_txt = form.fullName_txt.text;
    lv.deptName_txt = form.deptName_txt.text;
    lv.managerName_txt = form.managerName_txt.text;
    lv.sendAndLoad("mail.asp", lv, "POST");
    reset_btn.onRelease = function()
    fullName_txt.text = "";
    deptName_txt.text = "";
    managerName_txt.text = "";
    So far my reset button clears everything, and the submit
    button is tracing the content in the form fields, but it's not even
    grabbing the asp page.
    Any suggestions? Even pages that have tutorials that are in
    the form of a video.
    Thanks

  • Find and replace using wildcard

    I've inserted table content using Insert/Table Objects/Insert Tabular Data in DWCS3 and want to remove unwanted code from the table insert.
    Example:
    <td width=156 valign=top style='width:117.0pt;border-top:none;border-left:
      none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
      mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
      mso-border-alt:solid windowtext .5pt;background:#FF8A50;padding:0cm 5.4pt 0cm 5.4pt'><p class=MsoNormal><span style='mso-bookmark:CurrentPosition'><span
      style='font-size:10.0pt;font-family:Arial'>
    The text between "width" and "Arial'" varies but these two start and end words are the same in each instance to be replaced - how can I find and replace using a regular expression wildcard?  Have researched on web but not come across answer yet.  I thought it might be simple and hopefully it is and I'm just having a shocker. Is it something like Find:  "<td [^"]*> and Replace with: "<td>"?  Am I close?
    I'd appreciate anyone's help and thankyou in advance for your time.

    You might be able to sort this out with Commands > Clean Up Word HTML.
    However, the following regular expression should also do what you're looking for (make a backup first). Put this in the Find field:
    (<td)[\w\W]+?Arial\'(>)
    Put this in the Replace field:
    $1$2
    Select "Use regular expression".

  • Case Insensitive Search coupled with "LIKE" operator.

    Greetings All, I am running Oracle 11gR1 RAC patchet 25 on Windows X64.
    This db supports and application that requires case insensitive searches.
    Because there are a few entry points into the db I created an "after login" trigger:
    CREATE OR REPLACE TRIGGER MyAppAfterLogon_TRGR
    AFTER LOGON
    ON DATABASE
    DECLARE
    vDDL VARCHAR2(200) := 'alter session set nls_comp=''linguistic''';
    vDDL2 VARCHAR2(200) := 'alter session set nls_sort=''binary_ci''';
    BEGIN
    IF ((USER = 'MyAppUSER') OR(USER = 'MyAppREPORTINGUSER')) THEN
    EXECUTE IMMEDIATE vDDL;
    EXECUTE IMMEDIATE vDDL2;
    END IF;
    END MyAppAfterLogon_TRGR;
    This ensures that everyone connecting to the DB via any mechanism will automatically have case insensitive searches.
    Now, to optimize the know queries I created the standard index to support normal matching queries:
    select * from MyTable where Name = 'STEVE';
    The index looks like:
    CREATE INDEX "CONTACT_IDX3 ON MYTABLE (NLSSORT("NAME",'nls_sort=''BINARY_CI'''))
    This all works fine, no issues.
    The problem is when I write a query that uses the "LIKE" operator:
    select * from MyTable where Name like 'STEV%';
    I get back the record set I expect. However, my index is not used? I can't for the life of me get this query to use an index.
    The table has about 600,000 rows and I have run gather schema stats.
    Does anyone know of any issues with case insensitive searches and the "LIKE" clause?
    Any and all help would be appreciated.
    L

    I think there is issue with your logon trigger :
    "IF ((USER = 'MyAppUSER') OR(USER = 'MyAppREPORTINGUSER')) THEN"
    it should be :
    IF UPPER(USER) = 'MYAPPUSER' OR UPPER(USER) = 'MYAPPREPORTINGUSER' THEN
    because user name stored in Upper case. Check and try.
    HTH
    Girish Sharma

  • What is the best way to do a case insensitive search?

    Hi Guys,
    hopefully a quick one, anyone know what the best way to perform a case-insensitive search is? at the moment many of our stored procedures perform selects against un-indexed fields (e.g. product title) and to avoid casing problems we have an UPPER around the field name and the variable e.g.
    AND (nvcproducttitle IS NULL OR
    UPPER(p.NVCTITLE) LIKE '%' || UPPER(nvcproducttitle) || '%')
    This seems to work just fine but on a large catalogue (10 million+) it can take 50-60 seconds to return.
    Any pointers would be appreciated,
    J

    user7186902 wrote:
    Hi Guys,
    hopefully a quick one, anyone know what the best way to perform a case-insensitive search is? at the moment many of our stored procedures perform selects against un-indexed fields (e.g. product title) and to avoid casing problems we have an UPPER around the field name and the variable e.g.
    AND (nvcproducttitle IS NULL OR
    UPPER(p.NVCTITLE) LIKE '%' || UPPER(nvcproducttitle) || '%')
    This seems to work just fine but on a large catalogue (10 million+) it can take 50-60 seconds to return.
    Any pointers would be appreciated,
    JYou could either ensure you have a function based index for your column e.g.
    create or replace index fn_idx on prodtable (upper(nvctitle));
    nb. syntax not checked
    or you could use regular expressions. REGEXP_LIKE allows for case insensitive like searches.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/conditions007.htm#SQLRF00501

  • Case insensitive search working in dev but not in prod

    Hello All,
    I had set the CASE_SENSITIVE_CHARACTER_COMPARISON parameter as OFF in NQSConfig.ini file for enabling the case insensitive search in OBIEE.
    This setup is letting me do the case insensitive search in Dev env but the same doesnt work in prod env. I tried pointing both prod and dev rpd to same prod db.
    With same db also, case insensitive search doesnt work in prod env.
    Any idea for which other configuration I can look for.
    Thanks in advance.

    Thanks Stijin. I had seen this post earlier. Case insensitive search works fine after setting the value for NLS_SORT and NLS_COMP in production RPD but the other report with distinct clause starts failing. Not sure about the reason.
    Saw this comment from you in that post:
    The only compromise solution we could find was to "cache" the column value we wanted to use in insensitive searches. These were mainly used in "show all choices" while setting prompts. Other than that there isn't much you can do in an Oracle database.
    Can you please tell me how to implement the above.

Maybe you are looking for

  • Dual UOM at Sales Order

    Hi Friends I'm using OPM with Order Management ,at Sales Order Form when entering an item the UOM and the secondary UOM appear for that item but when trying to change the UOM to any else (The conversion for this UOM entered before) and when trying to

  • T60 VGA issue

    Hi all I have a problem with a second hand T60 I just bought. Everything works besides thre VGA port. I have tried to connect to a LCD screen and a projector, but without success at all. I am a rookie when it comes to BIOS settings, drivers etc., so

  • Since installing Maverick, my DVD player quit working.  Any ideas?

    I have never had any problems with my Mac when I was using my old system (maybe.. mountail lion? I fogot), however, once I installed the free Maverick upgrade, my DVD drive quit working.  I can still play CD's but no DVD's.

  • TypeError: matches has no properties

    Encountered this when trying to export CSS and Images.  What does it mean?  See attached for your referrence. Thanks in advance!

  • ITunes 9 Screwing Up Video Tags?

    Hello All, I'm running iTunes 9 on 10.6.1. I've been organising my TV Shows... adding Series, Episode ID, Number etc. In iTunes 8 I would load a Series into iTunes (copy to my internal drive), add the tagging data and move the files from the internal