Link to home
Start Free TrialLog in
Avatar of craig32768
craig32768

asked on

Cant update a SP

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

ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of craig32768
craig32768

ASKER

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?
AngelIII - I really need to get to grips with SQL 2008 - can you recommend any books for 'beginners' :-) ?
>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 ...
OK - thanks - Guess that's why your a 'Genius' ;-)
Thanks - much appreciated