Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Network:
Windows 2008 Server
>>>>>Hi,
>>>>>
>>>>>Who knows a shorter unique result than SYS(2015) delivers?
>>>>
>>>>Hi Peter
>>>>
>>>>could you explain what those uniqueness is good for?
>>>>SYS(2015) is not very good uniqe (for example for temp files on a multiuser scenario its not fast enough, I had crashes for non unique filles)
>>>>
>>>>This is by the way it is created.
>>>
>>>A colleague needs it to prevent that two users simultaneously create a temporary file. But more important is that he has only 5 positions to store the unique part.
>>>
>>>My guess is that he can use the right five positions of sys(2015) and delete the temporary file after a while.
>>>
>>>He wants to know the algorithm behind sys(2015).
>>
>>
>>Hi,
>>
>>Sys(2015) is derived from '0123456789ABC ~ Z' using the datetime(). A 5 position only, I guess for the reason as stated above the RIGHT(SYS(2015),5) will do, not effective unique but within the day it should work.
>
>Do you know the exact formula?
>
>But apart from that, I think you are right that the right five positions are unique for at least the day on at least that user's machine during that session. And that's what my colleague needed.
Peter,
Sorry I dont know the exact formula, would have consult somebody else, but I do know/remember that the last 5 digits are unique within 00:000 and 24:59 same day over different pc still working in the same network. Again that's what I recall, but again garantie tot aan de deur.
Regards,
Koen
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement