Subject Re: [firebird-support] gen_uuid() question
Author Fabiano Bonin
You can use the stored procedure i sent in the previous post to
retrieve or stored UUID´s as text and vice-versa:

select
(select result from sp_uuid2hex(gen_uuid())) as uuid
from
rdb$database

UUID
C6DA67414054A6408B5C1E66E0AE31B3

You just need to hack the stored procedure to insert the missing '-'

Regards,

Fabiano


On Tue, Mar 10, 2009 at 8:05 PM, dr_bentonquest <conversar@...> wrote:
> I starting using this function, however I wonder about the kind of values it generates. These are two examples:
>
> p`Ç#Ì Lš-^·ý®Èœ
> ¥—pN¡¬B®" 2}r›
>
> (Out of interest, this values can't even be edited with IBExpert while inspecting the data)
>
> Well, naive of me, I was expecting something more like:
>
> fa4ead15-b77b-4104-a3af-6a49f35828db
>
> So is this the normal behavior of gen_uuid() or am I missing something?
>
> Thanks!
>
>
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu.  Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
>
>
>