Write An SQL Statement Query That Will Center The Strings in Column GL - Code in Test - Accounting Table Ex. 01-2 01-A24
Write An SQL Statement Query That Will Center The Strings in Column GL - Code in Test - Accounting Table Ex. 01-2 01-A24
SELECT
REPLACE( LPAD(gl_code, (10-LENGTH(gl_code))/2 +
LENGTH(gl_code),'*'),gl_code)
|| RPAD(gl_code, (10-LENGTH(gl_code))/2 + LENGTH(gl_code),'*')
FROM TEST_ACCOUNTING
CLERK
200
300
400