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:
01313086
Views:
19
Hi to you both, this isn't pretty but it works - this is what I have
ALTER   Procedure DontUseCursors
As

DECLARE @ClaimRef varchar(10)
DECLARE @MasterRef varchar(10)


SELECT  @ClaimRef = Min(p.ClaimRef)
	 FROM PIFTest p
	

WHILE (@ClaimRef is not null)
    BEGIN
	Select @MasterRef = MasterRef from Claim Where ClaimRef = @ClaimRef
	print @ClaimRef + '    ' + @MasterRef

	SELECT  @ClaimRef = Min(p.ClaimRef)
	 FROM PIFTest p
	Where p.ClaimRef > @ClaimRef
    END
please feel free to show me a better way - thanks again to you both
Regards,
Peter J. Kane



Pete
Previous
Reply
Map
View

Click here to load this message in the networking platform