Posts
251
Comments
74
Trackbacks
4
Für's Archiv: Muster stored procedure

Für mein Archiv hier eine Muster für eine stored procedure:

CREATE

PROCEDURE Example

AS

BEGIN

   Declare

@Kundennr varchar(30)
   Declare @CumulY Decimal(15,2)
   Declare @CumulYminus1 Decimal(15,2)

   set

nocount on

   declare

#Cur Cursor forward_Only for
   select
* from tabelle

   open

#Cur
   
Fetch next from #Cur Into @Kundennr

   while

@@fetch_Status = 0
   begin

      -- do something

   end

   close

#Cur
   deallocate #Cur

END
posted on Wednesday, October 04, 2006 11:56 AM Print
Comments
No comments posted yet.

Post Comment

Title *
Name *
Email
Url
Comment *  
Please add 2 and 7 and type the answer here: