How can I remove the single-quote characters in my Issue Manager database?



How can I remove the single-quote characters in my Issue Manager database?


When working with a SilkCentral Issue Manager database that uses fields containing single-quote characters ( " ), the following error message may appear in Issue Manager when trying to save updated changes to a defect:

"Unhandled exception. See log for further information. ([TFRADARDB01]Line 1: Incorrect syntax near "Ready".)"

This is because the SQL compatible database used by Issue Manager uses single-quotes to identify values (e.g. "Test", "100"), and using these quotes as text can cause problems.

To remove single-quote characters from the database, you can use one of the following SQL queries. These are executed in the Advanced Query editor in Issue Manager, which can be found in [ISSUE MANAGER | TRACKING | QUERY | ADVANCED].

To find fields in the database that contain single quote characters, use the following SQL query:

SELECT * from DEFECT WHERE Disposition LIKE "%""%"

In the above query, replace the text in bold with the appropriate table name and field name where the single quotes are located.

To replace a value of a field with another value, i.e. replace "Fix Next Month" with Fix Next Month, you can run the following query in SQL Server"s Query Analyzer. Please note that this cannot be run from within the Issue Manager Query window:

UPDATE DEFECT SET Disposition = "Your Reason Code" WHERE Disposition = "%""Your Reason Code""%"

Note that "%""Your Reason Code""%" above has two single-quotes at either side of the text, not the double-quote character.

Old KB# 23758
Comment List
Related Discussions