Solved

Cant update a SP

Posted on 2009-05-17
6
246 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
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.

 
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
SQL Query 2 43
CROSS APPLY 4 44
SQL profiler equivalent in MS-Access 3 42
how to install/upgrade the Blitz responder kit 8 23
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.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

911 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now