Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scan of table
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01312331
Message ID:
01312874
Vues:
17
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform