lundi 29 juin 2015

MS SQL Read value with apostrophe from table and save it in another table

I am reading a value from table with apostrophe with which I create a dynamic query and than I run a sp to save it in another table, which works fine without apostrophe but throw an error when it contains an apostrophe.

e.g. set @sql = 'exec nameOfSP' + @arguments

@arguments value comes from database

Aucun commentaire :

Enregistrer un commentaire