Führende Nullen vor einer Zahl
| ID | 291 | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Link Reference | https://stackoverflow.com/questions/4899832/sqlite-function-to-format-numbers-with-leading-zeroes | ||||||||
| Link Credits | Not set | ||||||||
| Link Technical Documentation | Not set | ||||||||
| PlCodelang | SQLite | ||||||||
| PlGroup | Strings | ||||||||
| PlItemTitle | Führende Nullen vor einer Zahl | ||||||||
| Code | WITH cte_example AS ( SELECT 5 AS int_example UNION ALL SELECT 10 AS int_example UNION ALL SELECT 50 AS int_example ) SELECT int_example, substr('0000000'||ROW_NUMBER() OVER(ORDER BY int_example)||'00', -8, 8) AS example_result FROM cte_example ; | ||||||||
| Result Example |
|