Dynamic insert for Special Characters

Hello,
I'm running into a problem inserting data with Special Characters. I have a report (designed oracle reports), that takes data and inserts the data into table. I use the SRW.do_sql built in package in a before report trigger to process the data. However the problem that I'm running into is how to dynamically account for the special characters in a description field that I have. There is no way for me to predict where or how many can appear in a field. For example, I may have a field that contains data like:
O'REILLY AND ASSOCIATES INC.
OR
FULLER & D'ALBERT, INC.
OR
JOANNE'S BED & BACK SHOP
The only special characters that seem to be used and are causing me problems are the " ' " and " & ".
Does anyone know how I can dynamically account for these special characters in my insert statement?
Thanks,
Martin

Hello,
I'm using SRW.DO_SQL procedure in oracle reports because that is one you can run text via reports. The report actually exports the results to a text file and insert the results into a table. Anyway, the SRW.DO_SQL isn't my problem but rather the special characters. I have researched the problem some more and I have found a solution. You can use the "replace" feature to do an insert/update of special characters. You also need to find the character number for each special character. I believe "&" is chr(38), "%" is chr(37), "#" is chr(35), "@" is chr(64), "'" is char(39). So the code would be:
insert into tableA (column1) values(
replace(replace(replace(replace(replace(v_entity_name,chr(39),chr(39)),chr(38),chr(38)),chr(35),chr(35)),chr(37),chr(37)),chr(64),chr(64));
Martin

Similar Messages

  • Checking for Special Characters

    I need to check if a textbox in my form containes special characters (entered by user). If there are any, I need to display an error message.
    I have written a function but it's not working.
    here's my function:
    function checkForSpecialChracters(oFiled)
    var userInput = oFiled.rawValue; // take the String entered by the user
    var iChars = "@#$%^&*+=-[]\\\';,./{}|\":<>?~_";
    for (var i = 0; i < userInput.length; i++)
    if (iChars.indexOf(userInput.charAt(i)) != -1) {
    xfa.host.messageBox("Please check for special characters. The following characters are not allowed: @#$%^&*+=-[]\\\';,./{}|\":<>?~_ ", "Error Message", 3);
    // Change the color of the field
    oFiled.fillColor = "255,100,50";
    Any help would be greatly appreciated.
    Thank you!

    Paul,
    It is working now. I don't know what I might have changed.
    Here's my final function (It works!):
    function checkForSpecialChracters(oFiled)
    var userInput = oFiled.rawValue; // take the String entered by the user
    var iChars = "@#$%^&*+=-[]\\\';,./{}|\":<>?~_";
    var hasSpecialCharacter = false;
    for (var i = 0; i < userInput.length; i++)
    //app.alert("Value is: " + userInput.charAt(i));
    if (iChars.indexOf(userInput.charAt(i)) != -1)
    hasSpecialCharacter = true;
    break;
    } // end if
    } // end For loop
    if (hasSpecialCharacter)
    // Change the color of the field
    oFiled.fillColor = "255,100,50";
    xfa.host.messageBox("Please check for special characters. \n\nThe following characters are not allowed:\n\n @#$%^&*+=-[]\\\';,./{}|\":<>?~_ ", "Error Message", 3);
    else if (!hasSpecialCharacter)
    oFiled.fillColor = "255,255,255";

  • Text edit- Keystrokes for special characters

    They've changed the keystroke I use to use for making a checkmark.  It was 'Option v'.  Now it's not.  Is there a chart somewhere showing what teh keystrokes are now for special characters?  Thanks so much for any help.
    -Thom

    Okay, I found this, http://support.apple.com/kb/PH10758?viewlocale=en_US .  Which gives me the Edit/Special Characters.  But I still do not find any keystrokes to make my checkmark.

  • Bug in APEX_UTIL.DOWNLOAD_PRINT_DOCUMENT for special characters?

    Hi,
    I am using APEX_UTIL.DOWNLOAD_PRINT_DOCUMENT to download reports from BI-Publisher. But with special characters, and only if the filename is to long, the filename is in Firefox 10.0.2 not correct. In IE9 its running fine. I am not sure if its only a browser-problem or a problem with APEX.
    Here is the code:
    declare
        v_filename varchar2(1000);
    begin
        v_filename := 'Umlaut ü 123456789012345678901234567890123';
        APEX_UTIL.DOWNLOAD_PRINT_DOCUMENT (p_file_name => v_filename,
                                           p_content_disposition => 'attachment',
                                           p_application_id      => :APP_ID,
                                           p_report_query_name   => 'Checkliste',
                                           p_report_layout_name  => 'Checkliste',
                                           p_report_layout_type  => 'rtf',
                                           p_document_format     => 'pdf');
    end;With
    Umlaut ü 123456789012345678901234567890123its working and I get a file named "Umlaut ü 123456789012345678901234567890123.pdf".
    But with
    Umlaut ü 1234567890123456789012345678901234(one character longer) its not working and I get a file named "=_utf-8_B_VW1sYXV0IMO8IDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQucGRm".
    If I change the ü to ue I have no problems, even with much longer filenames.
    Very strange, isnt it?
    Any ideas for this?
    Kind Regadrs,
    Mark

    Hi,
    it does not work all fine with the IE. The following is not working both browser (firefox and IE):
        APEX_UTIL.DOWNLOAD_PRINT_DOCUMENT (p_file_name => 'Objektpruefung 02.08.2010 1000.pdf',
                                           p_content_disposition => 'attachment',
                                           p_application_id      => :APP_ID,
                                           p_report_query_name   => 'AnlagenCheckliste',
                                           p_report_layout_name  => 'AnlagenCheckliste',
                                           p_report_layout_type  => 'rtf',
                                           p_document_format     => 'pdf');The filename is then "Objektpruefung 02..pdf".
    Can anybody help me?
    Regards,
    Mark

  • JSP diplays shows junk for special characters.

    JSP Gurus,
    After upgrading the JRE version of my Tomcat from 1.3.1 to 1.4, all the JSP files have started displaying junk characters for the special characters (like ?, ?). These characters are being pulled from database. If I replace these characters with their ascii values, it works fine but there was no problem with the JRE 1.3.1. I have alot of data with these characters in the datbase. What is the easiest way to display these characters with JRE 1.4.
    Thanks,
    AG

    No One?!?

  • Find out the sql query for special characters.

    Hi,
    I have the emp table with column name first_name.In that table i have lot records with first_name inlcudes the below mentioned special characters.
    ¡ , ¿, ,Ä,Å,ä,ª,À,Á,Ã,à,á,ã,å,Æ,æ,Ç,ç,È,É,Ê,Ë,è,é,ê,ë,Ì,Í,Î, Ï,ì,í,î,ï, Ñ,ñ, ô, º, Ò, Ó, Ô, Õ, Ö, Ø, ò, ó, õ, ö, ø, ß, Û, Ù, Ú, Ü,ù, ú, û, ü, ÿ,
    I am looking for the records with includes the above mentioned special characters in the first_name column.
    Can u please give the sql query to find out the records.
    Thanks&Regards
    N.Sivaraman

    I am looking for the records with includes the above mentioned special characters in the first_name column.One way would be:
    select emp.*
      from emp,
           table (
             sys.odcivarchar2list ('¡',
                                   'Ä',
                                   'Å',
                                   'ä',
                                   'ª',
                                   'À',
                                   'Á',
                                   'Ã',
                                   'à',
                                   'á',
                                   'ã',
                                   'å',
                                   'Æ',
                                   'æ',
                                   'Ç',
                                   'ç',
                                   'È',
                                   'É',
                                   'Ê',
                                   'Ë',
                                   'è',
                                   'é',
                                   'ê',
                                   'ë',
                                   'Ì',
                                   'Í',
                                   'Î',
                                   'Ï',
                                   'ì',
                                   'í',
                                   'î',
                                   'ï',
                                   'Ñ',
                                   'ñ',
                                   'ô',
                                   'º',
                                   'Ò',
                                   'Ó',
                                   'Ô',
                                   'Õ',
                                   'Ö',
                                   'Ø',
                                   'ò',
                                   'ó',
                                   'õ',
                                   'ö',
                                   'ø',
                                   'ß',
                                   'Û',
                                   'Ù',
                                   'Ú',
                                   'Ü',
                                   'ù',
                                   'ú',
                                   'û',
                                   'ü',
                                   'ÿ'
    where instr (ename, column_value) > 0

  • Creating hotkeys for special characters in textedit

    Hello,
    I'm trying to type my maths HW on my mac on textedit or word 2008. I'm trying to type the Z (integer symbol). Now I have found that in Special Characters in textedit but I cannot add a hot key to it for frequent use. In word 2008 I didn't find it, although I could paste it from textedit. What's the way out?

    Hello,
    I'm trying to type my maths HW on my mac on textedit or word 2008. I'm trying to type the Z (integer symbol). Now I have found that in Special Characters in textedit but I cannot add a hot key to it for frequent use. In word 2008 I didn't find it, although I could paste it from textedit. What's the way out?

  • Unable to insert some special characters.

    Hi,
    I am not able to insert some czech characters into the database. The problem is mainly seems to be due to the characterset. When I query the record, it displays some garbage characters or ? instead of (ž, š). Can anyone please suggest me a solution for this problem?
    The DB characterset is :-
    SQL> select * from NLS_DATABASE_PARAMETERS where parameter like '%CHARACTERSET';
    PARAMETER VALUE
    NLS_CHARACTERSET WE8MSWIN1252
    NLS_NCHAR_CHARACTERSET AL16UTF16
    Many Thanks in Adbance.
    Sam:-)

    All characters are stored as a hexadecimal value either in one-byte (usually ASCII) or two-byte (Unicode). The mappings of which characters (or glyphs) go with which hexadecimal values constitutes a character set. Character sets are NOT equivalent to fonts. I used to build them.
    It sounds like the character set you are using on the server doesn't match with the character set on the client. This is not an uncommon problem. There are plenty of resources on the web for determining which characters map to which hex values. I recommend that you find the character set being used by the client and compare it to the one on the server. It is usually not a good idea to change the character set on the server after install, but Oracle may be able to help you through that. On the client end, you can look at the application and see if there is a way to change the character set to have it match what is on the server. For the Czech characters, I think that they are present in most ASCII symbolsets, but are not consistently mapped to the same hex values. Thus the problem you are seeing.
    Good Luck.

  • New-MailboxSearch with AQS for special characters

    I've been asked to perform a specific query for a term with a leading dollar sign ('$'): $123,123.00.  When I run the query for a leading dollar sign the keyword search term in the result appears as:
    Body:',123.00' 
    It doesn't work if I use a backslash literal with the dollar sign either.  The result in the report is:
    Body:' \,123.00 ' 
    Searching for Body:'123,123.00$' works: 
    Body:'123,123.00$'
    How do I search for leading special characters? Would '*123,123.00*" find the string I am looking for?

    Hi,
    I have some tests in my lab:
    1. When I run the following cmdlet, it works. I recommend you run the following cmdlet to achieve your search.
    New-MailboxSearch -Name "1" -TargetMailbox
    [email protected] -SearchQuery "$ 123,123.00"
    2. When the SearchQuery is "\123,123.00", it also works.
    3. When the SearchQuery is "*123,123.00*", it occurs the error below: Suffix matching isn't supported. Please remove the prefix '*' or type another query. The '*' character is not supported for search.
    Hope it helps.
    If you need further assistance, please feel free to let me know.
    Best regards,
    Amy
    Amy Wang
    TechNet Community Support

  • Keystroke combinations needed for special characters in specific fonts?

    How do you see the required keystrokes to enter special characters? Very frustrating!!! Using Pages to help my wife create a brochure. We wanted to use one of the symbols available in the font "Type Embellishments One LET" (which I assume installed with Pages). In Font Book we could see all the possible characters BUT NOT HOW TO TYPE THEM. We ended up typing scores of keys and keystroke combinations to finally see the one we wanted, then use cut and paste. There must be a better way but we (along with some Mac Support people at my work) cannot find it.
    Is there a way to do this without buying a program like PopChar. Seems like this should be fundamental to using a Mac out of the box.
    Thank you for any suggestions.

    You can use "Keyboard Viewer" to see what characters are created with various keystrokes. Open the International Preference Pane, click on the Input Menu tab & click the box next to Keyboard Viewer. This will make this available in your menu bar by clicking the flag icon. Select "Show Keyboard Viewer" from the flag menu & you will see a layout of the keyboard. You can then hold down the shift key, the option key OR shift + option to see all the possibilities. The highlighted ones are the accents than you can apply to letters. To get "é" type option-e (nothing will appear), then type e. This accent could be place over most letters. You can change the font in the drop-down menu. Not all fonts will have all characters. Keyboard Viewer places the typing directly into the top, open document.

  • Code to Check for Special Characters \/:*?" | in the given String

    Hi All,
    I need a java code to verify if the given string contains the Special Characters like \/:*?"<>|
    thanks
    krishnaveni

    http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html
    bye
    TPD

  • Find how may bytes or characters are occupied for Special Characters

    hi
    i would like to know how many characers are occupied for the below Russian characters. i am using UTF8 character set.
    because we need to transfer from one database to other for reporting
    inthe base databse it is stored and the field max length is 200
    and in reportiung database it is 80 char
    but when i check the direct length with length function it is showing and it is not able to fit in to the reportign database tables. can you help he to find how many characters or bytes it occupies to store in databse for these characters
    Actual Russina Characters. -------- ('óë. Ãåðîåâ-Ïàíôèëîâöåâ 22')

    Hi,
    <snip>
    how many characters or bytes it occupies
    </snip>
    you can use dump function:
    SQL> select dump(first_name)
    2 from employees
    3 where first_name = 'Peter';
    DUMP(FIRST_NAME)
    Typ=1 Len=5: 80,101,116,101,114
    <snip>
    base databse it is stored and the field max length is 200 and in reportiung database it is 80 char
    </snip>
    in the reporting database:
    alter table your_table modify column_name VARCHAR2(200);
    solved :)
    Regards,
    Tomek
    Message was edited by:
    Tomasz Tubis

  • How to insert some special Characters  in a table

    Dear All
    I have a value with some italian Characters ..
    Like :- )
    e l’attivazione - Here the ' symbol is not single quote , it is some ITALIAN characters .
    So how can i insert .
    I have value like :- e l’attivazione "Trasloco Linea Telefonica”, disponibili sul portale TUO, sezione Accessi/Traslochi"
    Insert into ABC values ('e l’attivazione "Trasloco Linea Telefonica”, disponibili sul portale TUO, sezione {code}Accessi/Traslochi"');                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hey,
    You can run below command to insert such value in single column of the table.
    INSERT INTO ABC VALUES ('e l’attivazione "Trasloco Linea Telefonical, disponibili sul portale TUO, sezione Accessi/Traslochi"');
    or you need to get ascii value of the character '’'
    e.g.
    SELECT ASCII('’') FROM dual;
    O/P
    14844057
    then use this ASCII value in CHR function while inserting data into table
    INSERT INTO ABC VALUES ('e l'||CHR(14844057)||'attivazione "Trasloco Linea Telefonical, disponibili sul portale TUO, sezione Accessi/Traslochi"');
    When you will query the data from table you be get below value for that column.
    e l’attivazione "Trasloco Linea Telefonical, disponibili sul portale TUO, sezione Accessi/Traslochi"
    Regards,
    Nisarg

  • Assign keyboard shortcuts for special characters.

    I am using Microsoft Word 08 and taking a Latin course. I want to be able to make a keyboard shortcut to insert the long symbols over vowel: Ā Ē Ī Ō Ū ā ē ī ō ū. When I go to Insert then Symbol none of these show up on the pallet. As of now I have to copy and paste every vowel individually from the save file in which it is currently written.

    I've already checked out that list, but it doesn't include the ones I'm looking for.
    Go to system prefs/international/input menu and check the box for US Extended, plus the box for "show input menu in Finder." Then select US Extended in the "flag" menu at the top right of the Finder.
    The characters you need can then be made by typing Option/alt + a, followed by the base character. Some fonts may work better than others.
    Here is a list:
    http://homepage.mac.com/thgewecke/diacritics.html

  • Report link not working for special characters

    Hi
    I am passing parameters from one report to another using Column Link... Everything is working fine, with the exception when there is a special character (&) within the customer name... When I click on such links I am getting an error messge... For example:
    H&R Block became H&amp;R Block Please advice...

    Consider the translate function. I am using this successfully when passing our item numbers from one page to another.
    select '<a href=f?p=&APP_ID.:2110:&SESSION.::NO::P2110_NEW_ITEM_NBR:'
    || translate(iim.item_nbr, ' &+', 'zyx') || '>'
    || iim.item_nbr
    || '</a>' item_nbr
    from inv_item_master iim
    ...etc
    Basically, in this case, translate will replace all occurrences of space with lower case z, ampersand with lowercase y, and plus sign with lowercase x.
    Then, on the destination page, 2110 in this case, I "translate" "z" to a space, "y" to an ampersand, and "x" to a plus sign, in my report query on pg 2110.
    I'm on VPN right now so I don't have easy access to my sources, but check the Oracle SQL reference or Google oracle translate.
    Also, consider signing your post so we know who to address when we reply.
    Hope this helps,
    Gregory

Maybe you are looking for

  • My hard drive is full, and it will not let me delete anything... :(

    hello, so here is the story... i bought my iMac about a little more than half year ago and i really like this mac. About 3 months ago, my computer started popping up me hard drive is full messages, and i did not really bother to delete any files. Bec

  • Hide/Show layers with Javascript

    Hello, I am trying to find a Javascript method for hiding/showing layers in a pdf document. I would like to be able to use an if/else statement to set the visibility of multiple layers. Let's say I have 5 layers on a single page, all set to hidden by

  • How will read the value from Adobe Reader/Viewer in c# windows App

    I m using VS2005 . working in windows appliction. i am using adobe Reader 9, Then the new pdf document open  inside the Acrobat adobe reader , Exsiting PDF file is created by Adobe Forms(Adobe LiveCycle designer and Adobe pro 9). Using the Class is:

  • Problem with "tile" effect in FCPX

    hello ! my problem is that FCPX renders unwanted "borders" (on both sides of the center column) while i use tiling (images below) please help. i have no idea where they came from or how to get rid of them. these lines are messing with my whole projec

  • CMYK to CMY Filter?

    I posted this elsewhere, but perhaps this would be the more appropriate forum for this question: Does anybody know where I might be able to find an Illustrator filter that would allow me to convert selected objects from CMYK or RGB to CMY only? Or do