• Hi,

    using the current system time to get a unique value is dangerous if the underlying server follows DST (daylight saving time).

    What happens if you generate a key around the switch from DST back to normal time?

    In this case you end up with one hour every year where you can have duplicates...

    If you don't want to store all the previous data in a table, you could use a combination of current date and a generated random code. Store the random part in a table and truncate it every midnight.

    Regards

    Lutz



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]