This Challenge Makes Cents

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

DECLARE @2 decimal(10,2)=1.43

DECLARE @ INT=@2*100
SELECT string_agg(left(nullif(c,0),99)
+' '+trim(substring('quarterdime    nickle  penny',b*8,8)),' ')
FROM(values(0,@/25),(1,@%25/10),(2,@%25%10/5),(3,@%5))p(b,c)

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results