| Databases InterBase (28) MS-SQL (5) mysql (32) Oracle (1) |
Having a generator generate a string (00001) instead of an integer (1)
Question: How to do my generator generate '00001' and not 1? I want my generator to generate a string representation of a number with leading zeroes.Answer: InterBase does not have a lot of string functions. You could either write a user-defined function (UDF) - the manual provides an example for a basic string function implemented as an UDF. The downside is that you're going platform specific then.Or you could use write some (slower) SQL code in your trigger:
Comments:
|