<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Build SQL Query with special characters in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Build-SQL-Query-with-special-characters/m-p/95790#M44225</link>
    <description>You can replace LogData like this Replace([LogData];"'";"''") So I can get something like that, it worked for me &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;BR /&gt;
&lt;PRE class="language-markup"&gt;&lt;CODE&gt;"[QueryText] = '"&amp;amp;[QueryText]&amp;amp;"' OR  [QueryText] = '"&amp;amp;Replace([LogData];"'";"''")&amp;amp;"'"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Filter:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="34871.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/34932i5F27FA5E9FD7849B/image-size/large?v=v2&amp;amp;px=999" role="button" title="34871.png" alt="34871.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Collection Initial:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="34872.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/34933i182E42EA980BD441/image-size/large?v=v2&amp;amp;px=999" role="button" title="34872.png" alt="34872.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Collection After Filter:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="34873.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/34934i54188009E32133C7/image-size/large?v=v2&amp;amp;px=999" role="button" title="34873.png" alt="34873.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I took this article as a basis:&lt;BR /&gt;&lt;A href="https://chartio.com/learn/sql-tips/single-double-quote-and-backticks-in-mysql-queries/" target="test_blank"&gt;https://chartio.com/learn/sql-tips/single-double-quote-and-backticks-in-mysql-queries/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jul 2021 19:43:43 GMT</pubDate>
    <dc:creator>EmersonF</dc:creator>
    <dc:date>2021-07-07T19:43:43Z</dc:date>
    <item>
      <title>Build SQL Query with special characters</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Build-SQL-Query-with-special-characters/m-p/95787#M44222</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;&lt;BR /&gt;I am trying to build a string to use in Query to Execute in SQL Server Object. This is how I am building the Query text.&amp;nbsp;&lt;BR /&gt;[QueryText]&amp;nbsp; = [QueryText] &amp;amp; "'" &amp;amp;[LogData] &amp;amp; "',"&lt;BR /&gt;&lt;BR /&gt;Problem:&amp;nbsp; [LogData] has some special characters like ', this is making the query not execute as it is not formed properly. How can we build a string that can take special characters.&lt;BR /&gt;&lt;BR /&gt;Thanks for the help.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;/P&gt;
&lt;P&gt;Chandra&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 18:00:12 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Build-SQL-Query-with-special-characters/m-p/95787#M44222</guid>
      <dc:creator>ChandraAndhe1</dc:creator>
      <dc:date>2021-07-07T18:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Build SQL Query with special characters</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Build-SQL-Query-with-special-characters/m-p/95788#M44223</link>
      <description>Hi, try it:&lt;BR /&gt;"[QueryText] = '"&amp;amp;[QueryText]&amp;amp;"' AND [QueryText] ="""&amp;amp;[LogData]&amp;amp;""""&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="34870.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/34930i9596CBCBB9B8F788/image-size/large?v=v2&amp;amp;px=999" role="button" title="34870.png" alt="34870.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Wed, 07 Jul 2021 18:58:50 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Build-SQL-Query-with-special-characters/m-p/95788#M44223</guid>
      <dc:creator>EmersonF</dc:creator>
      <dc:date>2021-07-07T18:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: Build SQL Query with special characters</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Build-SQL-Query-with-special-characters/m-p/95789#M44224</link>
      <description>Emerson,&lt;BR /&gt;&lt;BR /&gt;Thanks for the answer :).&lt;BR /&gt;&lt;BR /&gt;Problem I have is, I want to be able to add any text with either single or double quote or any special character. I don't want to limit the users sending me any characters.&lt;BR /&gt;&lt;BR /&gt;Users may send me [LogData] = This is a tes't message that&amp;nbsp; uses " quote in the middle&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I want to be able to insert into the MSSQL db without changing the characters.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Alternative is to clean the String for single Quotes and insert., but that is not what I am looking yet.&lt;BR /&gt;&lt;BR /&gt;Thanks for your time again..:)</description>
      <pubDate>Wed, 07 Jul 2021 19:07:52 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Build-SQL-Query-with-special-characters/m-p/95789#M44224</guid>
      <dc:creator>ChandraAndhe1</dc:creator>
      <dc:date>2021-07-07T19:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Build SQL Query with special characters</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Build-SQL-Query-with-special-characters/m-p/95790#M44225</link>
      <description>You can replace LogData like this Replace([LogData];"'";"''") So I can get something like that, it worked for me &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;BR /&gt;
&lt;PRE class="language-markup"&gt;&lt;CODE&gt;"[QueryText] = '"&amp;amp;[QueryText]&amp;amp;"' OR  [QueryText] = '"&amp;amp;Replace([LogData];"'";"''")&amp;amp;"'"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Filter:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="34871.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/34932i5F27FA5E9FD7849B/image-size/large?v=v2&amp;amp;px=999" role="button" title="34871.png" alt="34871.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Collection Initial:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="34872.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/34933i182E42EA980BD441/image-size/large?v=v2&amp;amp;px=999" role="button" title="34872.png" alt="34872.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Collection After Filter:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="34873.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/34934i54188009E32133C7/image-size/large?v=v2&amp;amp;px=999" role="button" title="34873.png" alt="34873.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I took this article as a basis:&lt;BR /&gt;&lt;A href="https://chartio.com/learn/sql-tips/single-double-quote-and-backticks-in-mysql-queries/" target="test_blank"&gt;https://chartio.com/learn/sql-tips/single-double-quote-and-backticks-in-mysql-queries/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 19:43:43 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Build-SQL-Query-with-special-characters/m-p/95790#M44225</guid>
      <dc:creator>EmersonF</dc:creator>
      <dc:date>2021-07-07T19:43:43Z</dc:date>
    </item>
  </channel>
</rss>

