>>The problem is that there may be more than one green record, but I need to select all the changes since the first green record. I thought about using TOP, but that doesn't work in a sql select.
>
> TOP works only when you have 'order by' in the select statement. So TOP in your subquery is the most useful, but just add 'order by'.
Sorry, I meant to say that the top in the subquery doesn't seem to work.
select * from stuff where logkey >= (select top 1 logkey from stuff where color = "GREEN" order by logkey)
returns an error: command is missing required clause
Any more ideas?
--Todd Sherman
-Wake Up! Smell the Coffee!