Subject | RE: [firebird-support] how to lpad in a stored procedure |
---|---|
Author | Helen Borrie |
Post date | 2005-02-21T02:08:32Z |
At 11:30 AM 21/02/2005 +1100, Alan McDonald wrote:
depended on to be based on a generator and the base number is always a
generated number.
to need to match up a key that is generated by another dbms.
It's not very good advice to recommend calculating keys, whether primary or
not, in the client application, if they have to be stored. It will blow up
in your face the first time another application (including an interactive
tool) tries to insert a record.
./hb
>Are you wanting this for a primary key? If so I wouldn't advise it.There's nothing wrong with a string for a primary key, provided it can be
depended on to be based on a generator and the base number is always a
generated number.
>NeedlessIt appears that a "display fudge" wasn't what was required here. He seems
>to say that you are changing the datatype here,... but in any case this
>padding of integers is better carried out on the client application if you
>just want to display padded numbers.
to need to match up a key that is generated by another dbms.
It's not very good advice to recommend calculating keys, whether primary or
not, in the client application, if they have to be stored. It will blow up
in your face the first time another application (including an interactive
tool) tries to insert a record.
./hb