select min(measurement), part_desc
(case len(measurement)
when 6 then '0000' + part_desc
else '000' + part_desc
end)
from LeachingView
where DateTimeStamp > '2011-01-01' and measurement > 0
group by measurement, part_desc
That is suppposed to append 0000's to the front of another char, but it doesn't work, and i was wondering why and how to make it correct.
The error I get is this:
'part_desc' is not a recognized built-in function name.