Having a generator generate a string (00001) instead of an integer (1)
This article has not been rated yet. After reading, feel free to leave comments and rate it.
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: