Trying to run the ff SQL stmt in a VB script and assign to a variable -
I get the ff exception error -
Notice that it tried to enclose the procedure name Coronary Angiography in quotes but was only able to add the open quote marks but not the end quote marks. Even when I added two sets of quote marks within the SQL statement, it did not recognize the second set of quote marks.
Any help will be greatly appreciated. Thanks
ssql = "SELECT Interventional From SS_Selection_Set_Elements_BLGH Where SS_Selection_Set_Elements_BLGH.element_text = """ & currentCathProceduresRecord("Procedure_Name")
I get the ff exception error -
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ApplicationException: Failed to execute sql statement: 'SELECT Interventional From SS_Selection_Set_Elements_BLGH Where SS_Selection_Set_Elements_BLGH.element_text = "Coronary Angiography' ---> System.Data.SqlClient.SqlException: Unclosed quotation mark after the character string 'Coronary Angiography'.
Incorrect syntax near 'Coronary Angiography'.
at System.Data.SqlClient.SqlConne
Notice that it tried to enclose the procedure name Coronary Angiography in quotes but was only able to add the open quote marks but not the end quote marks. Even when I added two sets of quote marks within the SQL statement, it did not recognize the second set of quote marks.
Any help will be greatly appreciated. Thanks