#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    2
    Rep Power
    0

    Question Generating big numbers


    Hi, please give me some clues abot my problem please:
    how can I generate big-unique numbers for a field through a procedure or a trigger ? I want to insert automatically in a field big and unique numbers(8-10 numbers long) when I do an INSERT action. Maybe if I can code the number like:
    DDMM(day and month)0000XY (it must be 10 numbers long, not less so I fill to the right with 0-es). As you can see the field is VARCHAR(10) but it can be an INTEGER as well, only that I don't know how to do it(setting a generator in advance with value = 1000000000 is ok ? Isn't it too big for a generator ?).
    Can I do that in a Firebird action ?!
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Location
    Bucharest
    Posts
    72
    Rep Power
    11
    Originally Posted by chiticco
    Hi, please give me some clues abot my problem please:
    how can I generate big-unique numbers for a field through a procedure or a trigger ? I want to insert automatically in a field big and unique numbers(8-10 numbers long) when I do an INSERT action. Maybe if I can code the number like:
    DDMM(day and month)0000XY (it must be 10 numbers long, not less so I fill to the right with 0-es). As you can see the field is VARCHAR(10) but it can be an INTEGER as well, only that I don't know how to do it(setting a generator in advance with value = 1000000000 is ok ? Isn't it too big for a generator ?).
    Can I do that in a Firebird action ?!
    in FB1.5 use BIGINT
    Romania it's a beautiful country ... too bad that it's populated with ... peoples!
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    2
    Rep Power
    0
    Ok..thanks..But still, is there a way to create formated fields from different types ? I know that is CAST word, but what about the format I've described up ?

IMN logo majestic logo threadwatch logo seochat tools logo