Hi!
I'm wondering is there any simple way to achieve the following
function call in SQL Server. The sentence to translate is (Oracle
syntax):
to_char(rownum, '000')
rownum: number of the current row
to_char: formats a number (the 1st param) according to the format
defined in the 2nd param. In this case, the '000' preprends 2 or more
zeros until forming a 3-digit number.
I'm using it in something like:
SELECT id_table, string_column || TO_CHAR(ROWNUM, '000') FROM table
Thanx a bunch,
Cro
I'm wondering is there any simple way to achieve the following
function call in SQL Server. The sentence to translate is (Oracle
syntax):
to_char(rownum, '000')
rownum: number of the current row
to_char: formats a number (the 1st param) according to the format
defined in the 2nd param. In this case, the '000' preprends 2 or more
zeros until forming a 3-digit number.
I'm using it in something like:
SELECT id_table, string_column || TO_CHAR(ROWNUM, '000') FROM table
Thanx a bunch,
Cro
Comment