mardi 10 mars 2015

How to add leading zeros to my data?

I have a varchar column that has variations of following data: WKKT-FM, 2/21 WKKT-FM, 1/24-2/14 WKKT-FM, 3/14-3/21, 4/11-4/18 IKKT-FM, 12/29-1/12, 1/26-2/09, 6/01-6/15


And so on. I need to place leading zeros in front of days and months. As you can see some of them already have leading zeros.


I tried looking for #/ or -#, but I have to account for some values that already have the leading zero.


A function would be preferable as I have to get this field via the SELECT statement.


What is an effective way to accomplish this?


Aucun commentaire:

Enregistrer un commentaire