Thanks for your response. I tried the change in the orderby clause and it did not generate the error, but did not actually order the results at all so I'm not sure what's going on there. If I remove the @fn:lower-case then the results are ordered but the ordering is case sensitive. For some reason t...