How do I build a CASE statement where I want to compare the same column, but different records. I know I can use LIKE, however in order to use LIKE, you know what you are comparing. I would like to compare the records without know what the string is. I inserted an example below. Same Estimate number, different Line number, but same Item number and description. For the Estimate number I would like to compare the Item number then compare the Item description then return the MAX of the Price column.
Image may be NSFW. Clik here to view. ![]() | |