The loop is too fast (or the granularity is current-dateTime to
coarse).  Concatenate something else (a random number plus the iteration
number?) to the id.

 

Colin Gerety
Flatirons Solutions Corporation



 

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Nizamuddin, Rashid
Sent: Monday, May 14, 2007 2:46 PM
To: General Mark Logic Developer Discussion
Subject: [MarkLogic Dev General] About hash map function

 

Could anybody please tell me why I am not getting a unique value when I
execute this loop

let $cnt := 1 to 5

for $c in $cnt

return 

    let $str := xdmp:hash64(string(current-dateTime()))

    return $str

 

for each iteration I get the same value. I need to get a unique value to
insert in some ids elements.

 

Any help will be appreciated

 

Rashid

 

_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to