As much as I try to disuade people from building processes that might come back to haunt them later, this one always seems to come up. So I gave in, I figure it might be useful from an admin perspective at some point, so here it is.
Use it at you're own risk, and don't go swimming at least 1 hour after use.
CREATE PROC usp_CopyTable @TABLE_CATALOG sysname , @TABLE_SCHEMA sysname , @TABLE_NAME sysname , @TMP_TABLE_NAME sysname OUTAS SET NOCOUNT ON BEGIN DECLARE @sql varchar(8000), @GetDate varchar(25) IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.Tables WHERE TABLE_CATALOG = @TABLE_CATALOG AND TABLE_SCHEMA = @TABLE_SCHEMA AND TABLE_NAME = @TABLE_NAME) BEGIN SET...
Wow did I hit a nerve? In Fair or Fowl I asked what people thought of someone who republishes an article, acts like they made the world a better place with their so called advice, even though a team of people took the time and energy to explain a proper methodology, which was only parroted by said poster. Who BTW did not even have the courtesy to contribute to that thread.
I guess I made headlines with his response in his article Setting Matters Straight. Well, I guess we can all play. So let's go ahead, and truly set matters straight.
EDIT: 9/30/2004PM ...