Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Script won't create a stored procedure
Message
De
12/04/2002 10:09:01
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Titre:
Script won't create a stored procedure
Divers
Thread ID:
00644255
Message ID:
00644255
Vues:
43
Hell Group,

The script has a cursor in it named maxgpa. I get the error message "Could not find table maxgpa. Will try to resolve this table later. The script doesn't put the stored procedure into the database.
The script is:
/****** Object: Stored Procedure dbo.sp_gpahist Script Date: 4/12/2002 9:46:42 AM ******/
if exist stuff deleted..
CREATE PROCEDURE sp_gpahist
AS
if exists (select * from sysobjects where id = object_id(N'[dbo].[cisgpahist]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[cisgpahist]

DECLARE MaxGPA CURSOR
FOR
SELECT MAX(dbo.gpahist.gpauniq) AS gpauniq,
dbo.gpahist.suniq
FROM dbo.jw1_distinct_suniq_for_Career_Center INNER JOIN
dbo.gpahist ON
dbo.jw1_distinct_suniq_for_Career_Center.suniq = dbo.gpahist.suniq
GROUP BY dbo.gpahist.suniq

OPEN MaxGPA


SELECT dbo.gpahist.suniq, gpahist.cumgpa
INTO cisgpahist
FROM maxgpa INNER JOIN
dbo.gpahist ON maxgpa.gpauniq = dbo.gpahist.gpauniq

CLOSE MAXGPA
DEALLOCATE MAXGPA

GO

SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON
GO
how do i fix this??

Thank you very much
Jim
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform