I am trying to generate a serie that contains both prefix ('A') and leading zeros.
SELECT * FROM generate_series(8,12)
will generate a serie
8
9
10
11
12
But I want to prefix and set max 4 leading zeros
A00008
A00009
A00010
A00011
A00012
Is this possible to do with a Postgresql query?
TIA!
SELECT 'A'||lpad(s::text,5,'0') as myval FROM generate_series(8,12) as t(s)