String - Function Padding (lpad, rpad)

1 - About

This function string add on the left or on the right a string pattern.

3 - Database

3.1 - SQL Server

This function does not exist and you can use this trick.

SELECT RIGHT('0'+ week , 2) FROM DIM_WEEK
GO

where the function:

  • add the pattern '0' on the left
  • return the right part of the text
data/type/text/pad.txt ยท Last modified: 2017/09/13 16:11 by gerardnico