﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2012 / SQL Server 2012 -  T-SQL  / Parameterized table names? / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 21 May 2013 06:42:02 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Parameterized table names?</title><link>http://www.sqlservercentral.com/Forums/Topic1416547-3077-1.aspx</link><description>[quote][b]Raymond van Laake (2/7/2013)[/b][hr]Hi,Thanks for your reply, was afraid this would be the outcome.The reason I need it is: my users can create a "campaign", and based on what's needed within that specific campaign a table is created. So at any time suddenly a new table can be present that is named dbo.Campaign00001, dbo.Campaign00002 etc.All through a user-interface, they cannot access SQL directly.[/quote]if the database is still in design phase , may be you can getaway with Entity Attribute model ; having the user create the table , I don't think that kind of stuff I would prefer.</description><pubDate>Mon, 11 Feb 2013 01:24:53 GMT</pubDate><dc:creator>demonfox</dc:creator></item><item><title>RE: Parameterized table names?</title><link>http://www.sqlservercentral.com/Forums/Topic1416547-3077-1.aspx</link><description>If tables have the same structure use a partitioned view, or bind and unbind table to view, or in SQL 2012 use synonym, all depend on your needs.</description><pubDate>Thu, 07 Feb 2013 01:12:48 GMT</pubDate><dc:creator>e4d4</dc:creator></item><item><title>RE: Parameterized table names?</title><link>http://www.sqlservercentral.com/Forums/Topic1416547-3077-1.aspx</link><description>Hi,Thanks for your reply, was afraid this would be the outcome.The reason I need it is: my users can create a "campaign", and based on what's needed within that specific campaign a table is created. So at any time suddenly a new table can be present that is named dbo.Campaign00001, dbo.Campaign00002 etc.All through a user-interface, they cannot access SQL directly.</description><pubDate>Thu, 07 Feb 2013 01:00:38 GMT</pubDate><dc:creator>Raymond van Laake</dc:creator></item><item><title>RE: Parameterized table names?</title><link>http://www.sqlservercentral.com/Forums/Topic1416547-3077-1.aspx</link><description>Nope.To be honest, that's something I strongly recommend against. It's a pain, it's a security hole if you're not incredibly careful and it suggests bad design (you wouldn't write a C# class that could operate on any type of object or struct passed in, why do it in SQL?)</description><pubDate>Wed, 06 Feb 2013 09:50:29 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>Parameterized table names?</title><link>http://www.sqlservercentral.com/Forums/Topic1416547-3077-1.aspx</link><description>Hey,We're going SQL2012 in a few weeks... does this version support parameterized table names? Currently we use dynamic SQL, it would be great if that wasn't necessary anymore.For example:DECLARE @tbl VARCHAR(MAX) = 'EMPLOYEES'SELECT * FROM @tblLooked it up on google, but saw no mention this is possible in 2012, so I thought lets ask here...Thx, Raymond</description><pubDate>Wed, 06 Feb 2013 08:33:40 GMT</pubDate><dc:creator>Raymond van Laake</dc:creator></item></channel></rss>