http://Bj83.de

MySql adding leading sign’s to coloumns

SELECT LPAD('1101', 8, '0');

and to remove them:

SUBSTRING(str_col, PATINDEX('%[^0]%', str_col+'.'), LEN(str_col))

Leave a Reply

Your email address will not be published. Required fields are marked *

Follow

Get every new post on this blog delivered to your Inbox.

Join other followers: