There's about 25 columns and I want to query them all while formatting this one column to include leading zeros.
i.e julianday = 5 I want the data to show 005 julianday = 145 I want the data to show 145
SELECT LPAD(julianday, 3 ,'000') FROM date_db
My query comes back with an error: No matching function with signature lpad(smallint, tinyint, string)
1)What am I missing? 2)Can I use *, to query the entire table while formatting that one column?
The first parameter in lpad needs to be a string so you would have to cast the date to a string, in the required format, before you can use it in lpad