Unique ID Generation - Kinda

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default Unique ID Generation - Kinda

    I need to generate a specific ID and am not exactly sure how to do it, maybe
    you guys can help. I have a range of codes from RTAD0001 to RTAD1000 as a bank
    of possible values. I will need to assign a value from this bank to specific
    records. The values will never be re-used so I can start with RTAD001 and
    increment it each time. I'm thinking of storing the value in a table and when I
    want to assign it I could get the value, increment by 1, then write the new
    value back to the table and the record receiving the value. Can I increment a
    'value' composed of letters and numbers? Should I store those seperately and
    combine the two for the insert on the record? Any ideas? thanks,

    SSgt P Guest

  2. Similar Questions and Discussions

    1. Unique Form inserting into many tables using unique id
      I have a Registration Form that have 3 steps. The data could be inserted into many (4) tables. Some data corresponding to a one table (the main or...
    2. HTML Generation (Next Generation CGI)
      Hi, This idea for the next generation of CGI has me thinking (see http://rubygarden.org/ruby?NextGenerationCGI). It seems that CGI would be best...
    3. kinda OT--CDO importance
      I've been using CDO to send an email with an Intranet app I have. Can't for the life of me remember where I got this code: .Importance = 1 '...
    4. what kinda mouse?
      I have the ms track ball explorer 1. The ball is dragging to bad to use so I'm in the market for a new mouse...I went to the roller ball mouse cause...
    5. kinda OT video ?
      Can a .inf file be made to run a avi or mpeg on insertion of CD? I want to put video file onto cd and have it auto start when it is inserted into...
  3. #2

    Default Re: Unique ID Generation - Kinda

    since all the codes start with RTAD, just seperate the RTAD and the number. each time, just let the database does the auto increment, and then add the new number to RTAD.
    chicken run Guest

  4. #3

    Default Re: Unique ID Generation - Kinda

    Got it, what's the column type settings I should use in mySQL to store the
    number being that it needs the leading zeros? Will one of the zeros drop when
    needed? Like when I go from 0009 to 0010? Sorry I'm such a dope on this. Kevin

    SSgt P Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139