sql server - Dynamic change schema in SQL procedure -


i have database multiple schemas. in every schema got table called [logs], database tables looks like:

[s1].[logs] [s2].[logs] [s3].[logs] ... [sn].[logs] 

every day run stored procedure, same operations on every above table. there way pass schema name stored procedure? using sql on azure.

no, not - unless sp uses dynamic sql execute sql string constructed in sp.

this happens via sp_executesql stored procedure

http://technet.microsoft.com/en-us/library/ms188001.aspx

has more information.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -