I'm running a select distinct query to pull only unique data tied to a client. For some of the data, I'm pulling, it is stored with leading zeroes, and for others it isn't. Is there a way to build in functionality to remove the leading zeroes when running the select distinct? I'm currently seeing what are essentially duplicates because the leading zeroes aren't causing the distinct to do it's job correctly.
My query is:
SELECT DISTINCT society, work_no
WHERE songcode = '5645'
and my results are showing: