You *need* to have something that you can sort by. Most likely, that will be something like an Inserted_TS. Once you have that, the previous message would be the record with no parent that has the maximum inserted_ts less than the one you're on. You can do this via the type of query sonaliak did or using an analytical fundtion. But first, you need that field to sort on.

- Chris