Is there a way to convert words like "fifteen" to "15" in postgres rather than writing a big case statement? I need it to accomodate 1-50.
Question posted in PostgreSQL
The official documentation can be found here.
The official documentation can be found here.
2
Answers
You can :
see dbfiddle
You can trick monetary type function
cash_words()
into doing something like that, as long as you can deal with the currency-related words and precision:And then:
Online demo