07-07-21 07:00 PM
Hi All,
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.
[QueryText] = [QueryText] & "'" &[LogData] & "',"
Problem: [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.
Thanks for the help.
Regards,
Chandra
Answered! Go to Answer.
07-07-21 08:43 PM
"[QueryText] = '"&[QueryText]&"' OR [QueryText] = '"&Replace([LogData];"'";"''")&"'"
Filter:
Collection Initial:
Collection After Filter:
I took this article as a basis:
https://chartio.com/learn/sql-tips/single-double-quote-and-backticks-in-mysql-queries/
07-07-21 07:58 PM
07-07-21 08:07 PM
07-07-21 08:43 PM
"[QueryText] = '"&[QueryText]&"' OR [QueryText] = '"&Replace([LogData];"'";"''")&"'"
Filter:
Collection Initial:
Collection After Filter:
I took this article as a basis:
https://chartio.com/learn/sql-tips/single-double-quote-and-backticks-in-mysql-queries/