Solved

Cant update a SP

Posted on 2009-05-17
6
257 Views
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]
GO
/****** Object:  StoredProcedure [dbo].[sp_delete_oldemailtohosts]    Script Date: 05/17/2009 23:09:03 ******/
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
ALTER procedure [dbo].[sp_delete_oldemailtohosts]
 
AS
BEGIN
 
DELETE
FROM         EmailsToHosts
WHERE     (EmailDate < DATEADD([month], - 3, GETDATE()))
 
end

Open in new window

0
Comment
Question by:craig32768
  • 4
  • 2
6 Comments
 
LVL 142

Accepted Solution

by:
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).
0
 

Author Comment

by:craig32768
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?
0
 

Author Comment

by:craig32768
ID: 24405787
AngelIII - I really need to get to grips with SQL 2008 - can you recommend any books for 'beginners' :-) ?
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
LVL 142

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 ...
0
 

Author Comment

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

Author Closing Comment

by:craig32768
ID: 31582342
Thanks - much appreciated
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Count with a subquery showing details 10 44
SSRS 2013 - Overlapping reports 2 22
Linked Server Issue with SQL2012 3 26
Loop through SQL parameters and insert to temp table? 4 41
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

803 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