|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 4:59 AM
Points: 163,
Visits: 283
|
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, December 20, 2010 7:50 AM
Points: 1,
Visits: 8
|
|
Hi I tried to paste your script to empty a database into a query in SQL 2008 management studio and I keep getting the following set of errors: Msg 102, Level 15, State 1, Line 74 Incorrect syntax near ' '. Msg 102, Level 15, State 1, Line 75 Incorrect syntax near ' '.
This is the lfirst line inside the While.. loop for cursor c. I have tried to change it, and nothing works unless I remove all lines inside the while loop (which is obviously defeating the purpose of the script!). Can you please suggest what I am doing wrong? I would like to use your script to see if I can empty my database just before deploying it
Luis Valentim
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 4:59 AM
Points: 163,
Visits: 283
|
|
Hi Luis, This script was written while SQL 2000 was actual version. I'll be back when I do test (or rewrite) on 2008.
Boka
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Saturday, June 12, 2010 8:29 AM
Points: 1,
Visits: 5
|
|
Hi,
I would encourage you to revisit this script sooner rather than later. I would very much like to use if with SQL Express 2005. I get a few more errors than in the previous post. Msg 102, Level 15, State 1, Line 74 Incorrect syntax near ' '. Msg 102, Level 15, State 1, Line 75 Incorrect syntax near ' '. Msg 102, Level 15, State 1, Line 79 Incorrect syntax near ' '. Msg 102, Level 15, State 1, Line 80 Incorrect syntax near ' '. Msg 156, Level 15, State 1, Line 84 Incorrect syntax near the keyword 'CLOSE'.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 4:59 AM
Points: 163,
Visits: 283
|
|
Hi Luis,
It looks that problem was just in copying script from web page to query window. It added some special characters. You can find file with unchanged script attached. I have tested it on SQL 2005 Developer Edition and it works fine. Of course it should be rewritten to use new system views but I don't have time for that right now. Please let me know if this works for you.
|
|
|
|