Cant update a SP

Posted on 2009-05-17
Last Modified: 2012-05-07
Hi - I'm no SQL guru but I had a database running a website that was SQL 2000 - I could create and update SPs no problem in it. My host upgraded to 2008 - when I go into Programability and SPs and chose to modify a SP - it keeps on prompting me to save is somewhere else when I click save.

It's a simple SP to delete some records after a period of time...

Also - I can't seem to create one as I used to in 2000. It again asks me to save it as a file rather than add it to the list of SPs in Management Studio...

Am I missing something really simple here?

USE [agoy]
/****** Object:  StoredProcedure [dbo].[sp_delete_oldemailtohosts]    Script Date: 05/17/2009 23:09:03 ******/
ALTER procedure [dbo].[sp_delete_oldemailtohosts]
FROM         EmailsToHosts
WHERE     (EmailDate < DATEADD([month], - 3, GETDATE()))

Open in new window

Question by:craig32768
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
LVL 143

Accepted Solution

Guy Hengel [angelIII / a3] earned 500 total points
ID: 24405757
> it keeps on prompting me to save is somewhere else
you have to RUN the sql (alter proc), and not SAVE it (to file).

Author Comment

ID: 24405778
Thanks...that worked.  How about creating a new one - in Enterprise Manager for SQL 2000 - I used to click and create a new SP - and it would appear in the SP file tree - in 2008 it doesn't seem to do that?

Author Comment

ID: 24405787
AngelIII - I really need to get to grips with SQL 2008 - can you recommend any books for 'beginners' :-) ?
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 24405808
>How about creating a new one
open a query window, and run a CREATE PROCEDURE statement ...

>can you recommend any books for 'beginners' :-) ?
sorry, I didn't need any books ...

Author Comment

ID: 24405834
OK - thanks - Guess that's why your a 'Genius' ;-)

Author Closing Comment

ID: 31582342
Thanks - much appreciated

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

634 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question