February 19, 2007 at 3:02 am
Hi all
I've been trying to script about 12 view, these view already exist in the destination db. Now when I use the wizard with the IF Exist and "Create Only" options it does not include the drop statement. How would I go about to include the drop statement in the script generated by the wizard.
l0n3i200n
February 20, 2007 at 6:29 am
I would very much like to see the answer to your above stated question. I have run into the same problem (it applies to tables and procedures as well). I have been using the Create Only and manually adding the Drop statement before running the script. This is becoming tiresome. Did you note that while the dropdown contains only the choices Create or Drop, the Description of the dropdown at the bottom of the screen contains all 3 options.
Frustrated in Florida!
February 20, 2007 at 6:47 am
Hi Sophie
I did notice the descriptions. I would think MS did remove the drop for safety reasons. ( or it can just be a plain bug ). I'm running SP 1 and it still didn't correct the problem.
February 20, 2007 at 9:14 am
Supposedly they added this functionality back in in SP2. Haven't had time to test it yet myself though
February 20, 2007 at 12:07 pm
Thanks Anders... you're right, it's in SP2. I'm having my guys install it this afternoon. The line reads: Generate Script Wizard. You can now specify that the scripted objects include a DROP statement before the CREATE statement. Scripting of objects into separate files is now possible. This feature is supported in SQL Server 2005 Express Edition SP2. I'm looking forward to it, I hope l0n3i200n does too!
Thanks again.
February 20, 2007 at 11:18 pm
I sure am looking 4ward to it. Thanks for all the replies and advice.
February 21, 2007 at 2:11 am
Hi
I've just upgraded my sqlexpress version to SP2. It still doesn't include the drop statement. Do I need to set something to make it insert it or is my luck just bad...
SELECT @@Version
returns
Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86) Apr 14 2006 01:12:25 Copyright (c) 1988-2005 Microsoft Corporation Developer Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
February 21, 2007 at 5:52 am
Well, I seem to be having the same bad luck. I also installed SP2 and the dropdown has exactly the same choices as before. It appears we have come full circle.
Anybody out there have any other suggestions?
March 14, 2007 at 1:43 am
G8 news
The latest service pack for sql 2005 now includes the drop statement option in the scripting wizard as a switch. I used it and it works like a charm.
Just though I'd let ya now.
,Cheers
l0n3i200n
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply