> From: R. Bruce Hoffman, Jr. > > as an aside.... > > update ranktest > set rank = (select max(rank) + 1 from ranktest) > where dollar = (select max(dollar) from ranktest > where rank = 0) > and rank = 0 > > if you repeatedly execute this, you get the ranking, but you have > to repeat > the execution of the statement until no more records are > updated.... sqlcode > <> 0 AIEEEEEEEEEEEEEEE! You aren't actually proposing this as a valid solution, are you??? If there are a million records in the file, you want to execute this SQL statement a million tmies, thereby executing TWO MILLION subselects? Please, at least add some kind of disclaimer stating, "This solution only valid on files of trivial size or in systems where performance is not an issue." Joe
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.