5 Replies Latest reply: Dec 1, 2012 10:25 AM by satrap RSS

    Escape syntax for single quote in Goldengate.

    976906
      Hi All,

      Can you please tell me Escape syntax for single quote (') in Goldengate.

      -
      Vijay

      Edited by: 973903 on Nov 29, 2012 2:22 AM
        • 1. Re: Escape syntax for single quote in Goldengate.
          satrap
          Try putting the whole string inside double quotes and \ before the '. Something like

          "ab\'cd"
          • 2. Re: Escape syntax for single quote in Goldengate.
            976906
            Thanks for your reply.

            I have to execute this token in extract parameter file

            TK-SPECIAL-STR = "~!@#$%^&*()_+=-`{}|\][:;"<>?/.,"


            But getting extract report as


            ERROR OGG-00312 Closing parenthesis missing for TOKENS.

            For your info am using 12C feature.

            Edited by: 973903 on Nov 29, 2012 3:42 AM
            • 3. Re: Escape syntax for single quote in Goldengate.
              satrap
              The whole string is enclosed within double quotes " " and you are using " inside the string as well. Try it this way

              TK-SPECIAL-STR = "~!@#$%^&*()_+=-`{}|\][:;""?/.,"                                                                                                                                                                                                                                                                                                                                                   
              • 4. Re: Escape syntax for single quote in Goldengate.
                976906
                Yes its Passing but i need to include double quote as a string but you asked me to enter two quotes means the usage is varying.,as i want to enclose all the special strings to the token.

                TK-SPECIAL-STR = ${var_literal}~!@#$%^&*()_+=-`{}|\][:;"<>'?/.,${var_literal},

                Edited by: 973903 on Nov 29, 2012 4:48 AM
                • 5. Re: Escape syntax for single quote in Goldengate.
                  satrap
                  It may be worth trying with putting Unicode escape sequence for each special character instead of the actual character itself?
                  e.g. Unicode escape sequence for $ is \u0024, for & is \u0026 and so on.
                  Here is the complete list

                  http://oreilly.com/actionscript/excerpts/as3-cookbook/appendix.html