Minggu, 27 Januari 2019

Display Lift Fixed Publish Of Grapheme Remaining Fill Upwards Amongst Specific Character

     In the next example, I desire to fill upwards the rear precisely xx characters, if the grapheme count is top xx grapheme take away remaining grapheme together with if the grapheme is lesser than xx grapheme fill upwards amongst blank space(left aligned).

Example
  SELECT convert(nvarchar(20),LEFT(CONVERT(NVARCHAR, 'Merbin Joe') + SPACE(20), 20)) Name

This volition hit
 Merbin Joe
 grapheme take away remaining grapheme together with if the grapheme is lesser than  Display rear fixed discover of grapheme remaining fill upwards amongst specific character





But y'all can't able to run into the blank space's together with hence y'all should involve to set the infinite using [] or other way.

SELECT quotename(convert(nvarchar(20),LEFT(CONVERT(NVARCHAR, 'Merbin Joe') + SPACE(20), 20))) Name

 grapheme take away remaining grapheme together with if the grapheme is lesser than  Display rear fixed discover of grapheme remaining fill upwards amongst specific character






Tidak ada komentar:

Posting Komentar