My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions

Issue 26 attachment: to_char.sql (227 bytes)

1
2
3
4
5
6
7
8
CREATE DEFINER = 'test'@'%'
FUNCTION ics.to_char(val INTEGER, padstr VARCHAR (16))
RETURNS VARCHAR (16)
BEGIN
SET @fill_char = LEFT(padstr, 1);

RETURN LPAD(CAST(val AS CHAR), CHAR_LENGTH(padstr), @fill_char);
END
Powered by Google Project Hosting