Operating enviroment is sql server 2005.
I have a 100,000 record table that is sorted ascending based on memo_id. I need a query that will always find two records next to each other in ascending order that have the following criteria:
operator_id in first row is ALWAYS different than operator_id in NEXT row. If TRUE-----
memo_system_txt in first record will ALWAYS start with 'Order DM14% ' AND
memo_system_txt in NEXT record will ALWAYS start with 'QA Order DM14% ' If TRUE Show Data
memo_id operator_id memo_type memo_system_txt
9606209193 326978 OR01 Order DM14 - O - 16354183 was created
9619571765 598755 OR02 QA Order DM14 - O - 16354183 was approved