Quantcast
Viewing all articles
Browse latest Browse all 4871

How to SQL equals string?

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.



Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>