(: connection to SPMT jdbc:mysql://localhost:3306:SourcingProjectManagement? root passe , connection to SPMT jdbc:mysql://localhost:3306:SourcingProjectManagement? root passe :) { let $contactsI := collection("intranet.keymro_contacts")/keymro_contacts, $contactsS := collection("SPMT:users")/users for $contactI in $contactsI let $NI := data($contactI/lastname), $NS := $contactsS/*[UserName/text()=$NI], $NS_ := if(string-length($NS) > 0) then $NS else "_" order by $NI return {$contactI/lastname} {$NS_} } (: Stylus Studio meta-information - (c) 2004-2007. Progress Software Corporation. All rights reserved. :)