Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scan of table
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01312331
Message ID:
01312874
Views:
15
Right,
not help at all.
Hmm
Create Procedure DontUseCursors
As
DECLARE @MasterRef    varchar(10)
DECLARE @ClaimRefCurr varchar(10)
DECLARE @ClaimRef     varchar(10)

SELECT @MasterRef    = c.MasterRef,
       @ClaimRef     = c.ClaimRef
 FROM claim c
      INNER JOIN (SELECT MIN(ClaimRef) AS ClaimRef FROM Claim) Tbl1
ON c.ClaimRef = Tbl1.ClaimRef

WHILE @ClaimRef IS NOT NULL
    BEGIN
       print @ClaimRef
       SET @ClaimRefCurr = @ClaimRef
       SET @ClaimRef     = NULL
       SELECT @MasterRef = c.MasterRef,
              @ClaimRef  = c.ClaimRef
 	FROM claim c
        INNER JOIN (SELECT MIN(ClaimRef) AS ClaimRef FROM claim
                           WHERE ClaimRef > @ClaimRefCurr) Tbl1
	ON p.ClaimRef = Tbl1.ClaimRef
    END
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform