escaping - SQL Server, Advanced Scaping quotes -


I am trying to create a problem which uses dynamic queries and parameters. I do sp_msforeachdb of'm using and it receives as a string parameter, this string is dynamic and content some other strings ...

clear for, it is my example:

  SET @vTableName = '## temp_table_' + convert (Anviaraaraar (8), Dotdet (), 112) SET @vQuery = 'sp_msforeachdb' ' Use the? If you like Dibi_nam () ( ''% _BASE '') INSERT into '' + VTableName + '' SELECT * elements WHERE identifier = 'P' '' ''   

Does anyone Also help me? Thanks a lot!

Make sure that using statements you want to do, but a few quotes

  announcement @ vTableName varchar (2000) dECLARE @vQuery varchar (2000) SET @vTableName = '## temp_table_' + convert (Anviacaaraar (8), Milnat (), 112) SET @vQuery = 'Sp_msforeachdb Use '' If you like Dibi_nam () ( ''% _BASE '') INSERT I + 'vTableName +' SELECT * from elements WHERE identifier = 'P' ''    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -