>I need to bring the last record in data for the idcompany=10. I need this without using cursor or temporary table, would be possible with just one query?
>
>TIA.
OK, it looks like it's based on the date/time. OK typing up a sample, will post here shortly.