How to check escape characters

Hi,
I have multiple rows in table data which contain charcters like (enclosed in []) [' &] etc which i want to insert in another table but as I insert the rows with above data (for eg. &) it prompts me for input as & is input charcter.. How can i find such rows with all such characters in table with say 50k records..? any generalized script for that..?
Thx,
JP

i want to insert in another table but as I insert the rows with above data (for eg. &) it
prompts me for input as & is input charcterI have to say that I don't understand your problem. What are your insert statement ?
It work fine for me :
  1  create table ch
  2  as select '['']' col from dual
  3  union all
  4  select '['''||chr(38)||']' from dual
  5  union all
  6* select '['''||chr(92)||']' from dual
SQL> /
Table created.
SQL> select * from ch;
COL
SQL> create table ch2 (col varchar2(10));
Table created.
SQL> insert into ch2 select col from ch;
3 rows created.
SQL> select * from ch2;
COL
SQL> Nicolas.

Similar Messages

  • How to use escape characters in expdp

    Hi All,
    Am exporting the dump by using expdp as follows
    expdp XXXXX/YYYYYY schemas=XXXXX INCLUDE=TABLE:\"LIKE('EXT_%')\" directory=DUMPDIR1 dumpfile=XXXXX_18-Dec-2012.dmp logfile=exp_XXXXX_18-2012.log
    rocessing object type SCHEMA_EXPORT/TABLE/TABLE
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
    Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
    Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
    Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
    Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
    . . exported "XXXXX"."EXT_COLLATERAL"                     556.5 KB    2543 rows
    . . exported "XXXXX"."EXT_CUSTOMER"                       184.1 KB    1210 rows
    . . exported "XXXXX"."EXT_ACCOUNT"                        142.8 KB    1116 rows
    . . exported "XXXXX"."EXT_CUSTOMER_IDENTIFICATION"        126.6 KB    1210 rows
    . . exported "XXXXX"."EXT_LN_ACCOUNT"                     111.3 KB     965 rows
    . . exported "XXXXX"."EXT_LN_ACCT_DISBRSMNT_EVENT"        102.5 KB     965 rows
    . . exported "XXXXX"."EXT_PERSON"                         108.7 KB    1210 rows
    . . exported "XXXXX"."EXT_DP_ACCOUNT_SUMMARY"             77.92 KB     151 rows
    . . exported "XXXXX"."EXT_LN_ACCOUNT_DISBURSEMENT"        100.4 KB     965 rows
    . . exported "XXXXX"."EXTENSION_BASIS_TYPE_REF"           5.296 KB       3 rows
    . . exported "XXXXX"."EXTERNAL_BANK"                      11.23 KB      40 rows
    . . exported "XXXXX"."EXTERNAL_BANK$AUD"                  12.73 KB      42 rows
    . . exported "XXXXX"."EXTRACTION_SVCE_REF"                5.289 KB       2 rows
    . . exported "XXXXX"."EXT_DP_ACCOUNT"                     24.64 KB     151 rows
    . . exported "XXXXX"."EXT_DP_ACCOUNT_INTEREST"            37.72 KB     151 rows
    . . exported "XXXXX"."EXTERNAL_SMS"                           0 KB       0 rows
    . . exported "XXXXX"."EXT_ACCOUNT_BLOCK"                      0 KB       0 rows
    . . exported "XXXXX"."EXT_ACCOUNT_CHARGE"                     0 KB       0 rows
    . . exported "XXXXX"."EXT_ACCOUNT_CHARGE_SUMMARY"             0 KB       0 rows
    . . exported "XXXXX"."EXT_ACCOUNT_CHARGE_TIER"                0 KB       0 rows
    . . exported "XXXXX"."EXT_ACCOUNT_CHEQUE_BOOK_ORDER"          0 KB       0 rows
    . . exported "XXXXX"."EXT_ACCOUNT_CHEQUE_INVENTORY"           0 KB       0 rows
    . . exported "XXXXX"."EXT_ACCOUNT_RELATIONSHIP"               0 KB       0 rowsit export fine.. But my requirement is needs to export tables start with EXT_%
    here expdp exports all table starting with EXT% how to specifies escape character in export option.
    excepted result
    . . exported "XXXXX"."EXT_COLLATERAL"                     556.5 KB    2543 rows
    . . exported "XXXXX"."EXT_CUSTOMER"                       184.1 KB    1210 rows
    . . exported "XXXXX"."EXT_ACCOUNT"                        142.8 KB    1116 rows
    . . exported "XXXXX"."EXT_CUSTOMER_IDENTIFICATION"        126.6 KB    1210 rows
    . . exported "XXXXX"."EXT_LN_ACCOUNT"                     111.3 KB     965 rows
    . . exported "XXXXX"."EXT_LN_ACCT_DISBRSMNT_EVENT"        102.5 KB     965 rows
    . . exported "XXXXX"."EXT_PERSON"                         108.7 KB    1210 rows
    . . exported "XXXXX"."EXT_DP_ACCOUNT_SUMMARY"             77.92 KB     151 rows
    . . exported "XXXXX"."EXT_LN_ACCOUNT_DISBURSEMENT"        100.4 KB     965 rows
    . . exported "XXXXX"."EXT_DP_ACCOUNT"                     24.64 KB     151 rows
    . . exported "XXXXX"."EXT_DP_ACCOUNT_INTEREST"            37.72 KB     151 rows
    . . exported "XXXXX"."EXT_ACCOUNT_BLOCK"                      0 KB       0 rows
    . . exported "XXXXX"."EXT_ACCOUNT_CHARGE"                     0 KB       0 rows
    . . exported "XXXXX"."EXT_ACCOUNT_CHARGE_SUMMARY"             0 KB       0 rows
    . . exported "XXXXX"."EXT_ACCOUNT_CHARGE_TIER"                0 KB       0 rows
    . . exported "XXXXX"."EXT_ACCOUNT_CHEQUE_BOOK_ORDER"          0 KB       0 rows
    . . exported "XXXXX"."EXT_ACCOUNT_CHEQUE_INVENTORY"           0 KB       0 rows
    . . exported "XXXXX"."EXT_ACCOUNT_RELATIONSHIP"               0 KB       0 rowsThanks
    Sami.

    expdp XXXXX/YYYYYY schemas=XXXXX INCLUDE=TABLE:\"LIKE('EXT\\_%')\" directory=DUMPDIR1 dumpfile=XXXXX_18-Dec-2012.dmp logfile=exp_XXXXX_18-2012.log
    or
    expdp XXXXX/YYYYYY schemas=XXXXX INCLUDE=TABLE:\"LIKE('EXT\_%')\" directory=DUMPDIR1 dumpfile=XXXXX_18-Dec-2012.dmp logfile=exp_XXXXX_18-2012.log its not working which gives the following error
    Estimate in progress using BLOCKS method...
    Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 0 KB
    ORA-39165: Schema XXXXX was not found.
    ORA-39168: Object path TABLE was not found.
    ORA-31655: no data or metadata objects selected for job
    Job "XXXXX"."SYS_EXPORT_SCHEMA_01" completed with 3 error(s) at 10:30:13when i gives EXCLUDE option then it working but it also exporting all tables
    expdp XXXXX/YYYYYY  schemas=XXXXX EXCLUDE=TABLE:\"LIKE('EXT\\_%')\" directory=DUMPDIR1 dumpfile=XXXXX_19-Dec-2012.dmp logfile=exp_XXXXX_19-Dec-2012.log
    Estimate in progress using BLOCKS method...
    Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 133.1 MB
    Processing object type SCHEMA_EXPORT/USER
    Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
    Processing object type SCHEMA_EXPORT/ROLE_GRANT
    Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
    Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
    Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
    Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
    Processing object type SCHEMA_EXPORT/TABLE/TABLE
    Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
    Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
    Processing object type SCHEMA_EXPORT/TABLE/COMMENT
    Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_SPECany idea or suggestion?
    Thanks
    Sami

  • How to replace escape characters in a string ?

    Hi All,
    In my application I came across a problem where I want to replace a substring (contains escape characters also) with another string. The below shown code will replicate my problem :
    public class StringSearchAndReplace {
      public static void main(String args[])   {
        String stmt = " \\pntext\\bullet\\tab The question as to ";
        String newStmt = stmt.replaceAll("\\bullet\\tab",  "B");
        System.out.println("BEFORE: " + stmt + "\n");
        System.out.println("AFTER: " + newStmt);
    }Here I want to replace "\\bullet\\tab" with "B". I am unable to move further. Please help/suggest me in this regard.
    Its urgent.
    Thanks in advance.

    Satyaprasad_Mylavarapu wrote:
    Hi All,
    In my application I came across a problem where I want to replace a substring (contains escape characters also) with another string. The below shown code will replicate my problem :
    public class StringSearchAndReplace {
    public static void main(String args[])   {
    String stmt = " \\pntext\\bullet\\tab The question as to ";
    String newStmt = stmt.replaceAll("\\bullet\\tab",  "B");
    System.out.println("BEFORE: " + stmt + "\n");
    System.out.println("AFTER: " + newStmt);
    }Here I want to replace "\\bullet\\tab" with "B". I am unable to move further. Please help/suggest me in this regard.
    Its urgent.
    Thanks in advance.If the String you're trying to replace contains a slash you need four slashes (double it for java, then again because String.replaceAll takes a regular expression)
    So I think what you're looking for is:
    String newStmt = stmt.replaceAll("\\\\bullet\\\\tab",  "B");I haven't tested that though.

  • How not to escape characters in 3.1

    Hello
    In Apex 2.0 i used to store html text in an item; if i used it in an html region or in a label it worked fine, i mean it showed the formatted text.
    In Apex 3.0, it shows the full html text as if i used escape special characters but i want it html formatted; is that a migration error? even if a create a new app happens the same thing. How can we solve it?
    Thanks

    The item type needs to be (a) an application item, or (b) Display as Text (escape special characters, does not save state) with its condition set to Never.
    Scott

  • How to check special characters in view

    hi,
    I have a field in view,in which want to check the field value doesnt contain any special characters.
    the field is a char field and it is not associated to any specific data element.
    Can u please help me in this reg.
    Regards,
    Saujanya

    Hi Saujanya,
                        In my recent reply............i have give the general answer.
    Here is the answer you are  looking for........
    data:
       w_check(37)  TYPE c.
    w_check = sy-abcde.
    concatenate '0123456789' w_check INTO  w_check.
    concatenate '_'   w_check INTO  w_check.
    IF view_name-field_name CO w_check.
    ur code.......
    ELSE.
    Message 'UR text' TYPE 'E'.
    ENDIF.
    Hope,your problem is solved.........
    Reward,if helpful.
    Regards,
    V.Raghavender.

  • How to remove escape characters

    When there is string in my source like my boss is "chandra" it is taking like it is taking like "my boss is ""chandra""".
    Could you please give me suggestion how I can eliminate unnecessary escape character.
    -Pallav

    Hi Pallav,
    Is possible to you just use a replace function at a stage area mapping?
    like: (assume that "my boss is ""chandra""" is at col1)
    replace(col1, '""', '"')
    it's means, replace 2 " by 1 "

  • How to check special characters in java code using Java.util.regex package

    String guid="first_Name;Last_Name";
    Pattern p5 = Pattern.compile("\\p{Punct}");
    Matcher m5 =p5.matcher(guid);
    boolean test=m5.matches();
    I want to find out the weather any speacial characters are there in the String guid using regex.
    but above code is always returning false. pls suggest.

    Pattern.compile ("[^\\w]");The above will match any non [a-zA-Z0-9_] character.
    Or you could do
    Pattern.compile("[^\\s^\\w]");This should match anything that is not a valid charcter and is not whitespace.

  • How to check multiple special characters in instr function sql query.

    Hi,
    The following special characters are comma(,), slash(/), colan(:)
    these special characters i need to be check in instr function.
    select SUBSTR(master_title,1,INSTR(master_title,',',1,1)-1) from dual;
    Can you please write the query with right answer.
    Thanks in advance,
    Lakshman.

    Why multiple post?
    How to check multiple special characters in this query.

  • How can I use escaped-characters in an option

    I have the following code that is used to retrieve city-names including parent-child relations from a database and place them in an array:
    <%@ page contentType="application/x-javascript" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
    <sql:setDataSource dataSource="jdbc/KADOS" var="Raak" scope="session" />
    <sql:query var="bewaringSQL" dataSource="${Raak}">
    SELECT bewaringcode, vestigingsplaats FROM BEWARING order by vestigingsplaats
    </sql:query>
    bewaringen = new Array(
    <c:forEach items="${bewaringSQL.rows}" var="plaats" varStatus="s" >
    new Array( "<c:out value="${plaats.BEWARINGCODE}" />",
    "<c:out value="${plaats.VESTIGINGSPLAATS}" />" )
    <c:if test="${not s.last}">,</c:if>
    </c:forEach>
    i=0;
    <c:forEach items="${bewaringSQL.rows}" var="plaats" varStatus="s" >
    <sql:query var="bewaringGemSQL" dataSource="${Raak}" sql="SELECT KADGEMCODE, KGMNAAM FROM KADGEMEENTE where BEWARINGCODE=? order by KGMNAAM">
    <sql:param value="${plaats.BEWARINGCODE}" />
    </sql:query>
    tmp = new Array(
    <c:forEach items="${bewaringGemSQL.rows}" var="gem" varStatus="s" >
    new Array( "<c:out value="${gem.KGMNAAM}" />",
    "<c:out value="${gem.KADGEMCODE}" />" )
    <c:if test="${not s.last}">,</c:if>
    </c:forEach>
    bewaringen[2] = tmp;
    i = i+1;
    </c:forEach>
    function bewaringenList(selectCtrl, itemArray) {
    for (i=0; i<itemArray.length; i++) {
    selectCtrl.options[i] = new Option(itemArray[i][1]);
    selectCtrl.options[i].value = itemArray[i][0];
    function setList(selectCtrl, itemArray) {
    for (i=selectCtrl.options.length; i>=0; i--) {
    selectCtrl.options[i] = null;
    for (i=0; i<itemArray.length; i++) {
    optie = filter(itemArray[i][0]);
    selectCtrl.options[i] = new Option(optie);
    selectCtrl.options[i].value = itemArray[i][1];
    function filter( invoer) {
    retour = invoer;
    retour = retour.replace("'", "\'");
    return retour;
    The function 'bewaringenList' populates a <SELECT> with parent-names and
    "setList(document.VraagForm.gemSelect, bewaringen[this.selectedIndex][2]);" populates the depending <SELECT> with child-names.
    Some names contain single quotes (like "&#039;t Zandt") and are displayd in the select-box as "&#039t Zandt".
    I expected that the quotes could be replaced by escape-characters by 'filter(invoer)' but this does not work.
    Is there a generic way to show these characters?
    Ben

    I don't understand why but this filter solved the problem:
    function filter( invoer) {
    retour = invoer;
    retour = retour.replace("&#039;", "'");
    return retour;

  • How to display special characters in APEX Classic Report column

    Ref: Thread: How to display newline characters as new lines
    Version: APEX 3.2
    Hi,
    I have created an classic SQL Report with one of the columns being a decode that gives a value 'Post'(the value should be highlighted in Red) on one condition and 'Pre' on another. I have followed the advice given in the page (URL provided above) , i.e. I have changed Strip HTML to 'No', changed Display as to 'Display as text (escape special characters, does not save state)'. I have also passed this value back to the same page to be stored in a page item each time a link (another column in report) in report is clicked. I have tried passing it as #DEADLINE# and \#DEADLINE#\. The issue I face is, instead of the value being highlighted in Red, it gets passed back as a string holding the value 'Post'. Is there any way I can get this to display as it should without the Strip HTML being changed to 'Yes'.
    Thanks very much.
    Rohi
    Edited by: Rohi on 18-Jul-2012 04:21

    876651 wrote:
    Hi,
    Thanks for your response.
    I am trying to display a page item that is derived from a report column based on a click on the URL link (*view >*>)
    This page item (here, it is Manager_ID) should ideally be highlighted when a particular condition is satisfied (achieved using a DECODE in the report).
    But it is not displayed like it should be.
    I do not want the value to be displayed along with the html tags as a string.
    I want the html tags to take effect and highlight the value within it.
    Initially, I had set Strip HTML to Yes and the value was returned without any highlighting .
    So I changed it to 'No' and and it contained the html tags.
    I am not sure what setting in APEX Report Attributes can help me achieve that effect I want.None of the report settings are relevant. They affect the rendering of the report and none of the columns you were changing the properties of were actually rendered.
    You can't pass HTML and CSS around in URL parameters.
    I suggest you pass *2* values in the column link: the MGR ID and a simple class or colour value computed by the DECODE in the report. I've suppressed the first version of the report and created a new one that does this:
    decode(dept.deptno, '30', 'c00', '000') highlight The link column now passes the MGR ID and the HIGHLIGHT colour (red when the condition is satisfied and black when it is not).
    I created another hidden and protected page item <tt>P0_HIGHLIGHT</tt> as the target for the highlight value, and used the Pre/Post Element Text properties of the <tt>P0_G_MGR</tt> to wrap it in a <tt>span</tt> whose colour is changed using the <tt>P0_HIGHLIGHT</tt> value as a subtitution string:
    <span style="color: #&P0_HIGHLIGHT.;">Having done that, I still don't really get the requirement here. I'm sure that given the full picture I'd be using a completely different approach...

  • How to Check System Preference Settings with Time Machine

    I just found and fixed a problem caused by a bad System Preference/Universal Access
    setting and would like to go back in my Time Machine backup to see where the
    error was made. I may have been too quick to blame the 10.5.3 update on the
    problem so wanted to look back in time.
    The problem is i don't know how to check System Preferences using the Time Machine.
    Any suggestion?

    If you're looking for specific settings, the short answer is you cannot. You can open the .plist files and try to find the specific option you're looking for, though it might not be too easy to decipher some of the contents of the .plist file. For the most part they're just lists of attributes and settings. For instance, here's a very small chunk of my Finder .plist file:
    <key>All Images.cannedSearch</key>
    <dict>
         <key>SidebarWidth</key>
         <integer>162</integer>
         <key>ToolbarVisible</key>
         <true/>
         <key>ViewHeight</key>
         <integer>1116</integer>
         <key>ViewStyle</key>
         <string>icnv</string>
         <key>WindowBounds</key>
         <dict>
              <key>bottom</key>
              <integer>1200</integer>
              <key>left</key>
              <integer>56</integer>
              <key>right</key>
              <integer>1920</integer>
              <key>top</key>
              <integer>84</integer>
         </dict>
    </dict>
    <key>AnimateInfoPanes</key>
    <true/>
    <key>AnimateSnapToGrid</key>
    <string>true</string>
    <key>AnimateWindowZoom</key>
    <true/>
    Each "key" is followed by an attribute, so for instance the "SideBar Width" key is given the "Width" integer attribute of 162. However, some keys have multiple entries, such as the "WindowBounds" key having sub-keys of "bottom", "left", "right", and "top".
    These values are finder preferences, though are not accessible via the finder's preference settings. However, buried deep in the Finder's .plist file are some of the user-editable settings:
    <key>ShowHardDrivesOnDesktop</key>
    <true/>
    <key>ShowMountedServersOnDesktop</key>
    <true/>
    <key>SidebarSearchesSectionDisclosedState</key>
    <false/>
    If you can find the attribute you're looking for, then that may help you narrow down which version of a .plist file to restore, though not all of them are straightforward legible text. Some have bizarre strings of seemingly random characters that only the application can interpret.
    Message was edited by: Topher Kessler

  • How to check a XMLTYPE table for corrupted (not invalid!) XML records ??

    Hello,
    I'd like to get help on the following issue, please. I need to check the XML data in a number of tables with XMLTYPE data type. Some of the data is corrupted but in terms not that the XML format is wrong but there is no XML at all in the fields but just only, for example, control characters (no tags, no anything, just corrupted data).
    So, I have made a PL/SQL procedure cursor to get all the tables from a list, and then another cursor inside to browse each table for corrupted records. But can you help me how to check this? Any of the XML functions like for example: XMLIsValid, isFragment(), getrootelement(), etc. return to me an Oracle error "ORA-31011 XML parsing failed" and the procedure gets stuck on the first found bad record. But I need to continue and check all of them. Is it possible to get the ORA-31011 error with EXCEPTION, write to a logging table the corrupted record ID, and then continue?
    Here is my simple procedure:
    CREATE OR REPLACE PROCEDURE CHECKXML (v_schema in VARCHAR2)
    IS
         v_Message     VARCHAR2(254);
         sql_stmt1     VARCHAR2(1000);
         sql_stmt2     VARCHAR2(1000);
         c1           SYS_REFCURSOR;
         c2           SYS_REFCURSOR;
         cur_tab          varchar2(100);
         cur_appl     varchar2(100);
         cur_rec     varchar2(200);
         valid_flag     number;
         criteria     VARCHAR2(20);
         tab1          VARCHAR2(20);
         tab2          VARCHAR2(20);
    BEGIN
         criteria := 'XMLTYPE';
         sql_stmt1 := 'select id, path from ' || v_schema || '.stubfiles where type=:bcriteria';
         open c1 for sql_stmt1 using criteria;
         loop
         begin
              fetch c1 into cur_tab, cur_appl;
              exit when c1%notfound;
                   insert into system.log_table values (sysdate, v_schema, 'next table', 'id ' || cur_tab, 'appl ' || cur_appl, '');
              sql_stmt2 := 'select t.recid, t.xmlrecord.isFragment() from ' || v_schema || '.' || cur_tab || ' t';
              open c2 for sql_stmt2;
              loop
              begin
              fetch c2 into cur_rec, valid_flag;
                   exit when c2%notfound;
                   insert into system.log_table values (sysdate, v_Schema, 'next record', 'id ' || cur_tab, 'recid ' || cur_rec, 'valid ' || valid_flag);
                   commit;
              EXCEPTION
                   WHEN OTHERS THEN v_Message := sqlerrm;
                   dbms_output.put_line('Error for ' || cur_tab);
                   dbms_output.put_line('-' || v_Message);
                   insert into system.log_table values (sysdate, cur_tab, 'id err' || c_Row.ID,'appl err' || c_Row.path, v_Message,'');
              end;
              end loop;
              close c2;
              commit;
         end;
         end loop;
         close c1;
         commit;
    END CHECKXML;
    Thanks in advance
    Evgeni

    Hi
    Why do you use a GTT? Just keep your xml in memory...
    HTH
    Chris

  • Escaping characters on help page

    I would like to escape some html-code I'm placing on a help region. Is that possible? How is the escaping for escaped html region implemented? Can I use the same API?

    No, that does not help. I want it to show up in the webpage. So I want to be able to write some htmlcode on the page and display the actual html code for the reader. The comment would just make it not interpreted by the browser, but it would not show up on the webpage.
    In this case it is a basic DIV I want to show including the tags. I want to grab the code from it's actual place and show it here, so just reqriting the tags is not a good option. Calling a function to do some basic replacements would be OK though. Even better would be to be able to use an HTML region that escapes the special characters, but it seem like the help region only uses a standard html region.

  • Official documents on escaping characters in SQL Server query statements

    Hi,
    Are there any official documents on how to escaping special characters in SQL Server query statements? I find a lot of online resources discussing about this, but there are no definitive conclusions on:
    Which characters should be escaped? (Some only said single-quote needs to be escaped, double-quote does not need. While others said both need to be escaped)
    How to escape characters? (Some said using two single-quote to escape a single-quote. Others said using a backslash, etc.)
    So I just wonder if there is an official document from Microsoft regarding this?
    Thanks
    Alan

    Depends on where you're using them
    If its string values then single quotes(') should be escaped by putting one more single quote before it.
    If its LIKE operator you can use ESCAPE keyword or use [] to escapre special characters 
    see
    http://visakhm.blogspot.in/2013/01/wildcard-character-based-pattern-search.html
    If inside SSIS expression you can escape characters like \ " etc by adding an extra \ before the characters
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Template cannot contain escape characters

    I created a database function which takes a varchar2 variable as input and passes back a number as output.
    I am using pre mapping process to call this function and I created a constant with the value I want to pass to this function. When I try to validate my mapping I am getting this error
    Template cannot contain escape characters.
    Why am i gettign this error any ideas as to how to fix this. I know for sure the join of the constant to the input mapping process is causing this error but my constant variable just has
    'xxxxx_xxxx' no other characters.
    Thanks

    Hi
    Are you using the 10.2.0.1 production release, I think this is bug 5403652. It should be fixed in a patch after (10.2.0.2 onwards), you could also try set based only code generation and see if this bypasses the problem (there is a comment in the bug indicating it is a row based code gen bug).
    Cheers
    David

Maybe you are looking for