betoesquivel

xquery4

Oct 8th, 2014
529
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.32 KB | None | 0 0
  1. SELECT idCategoria, NombreCategoria, XMLQuery(
  2. 'for $x in collection("CatalogoCD")/catalogo/cd
  3. where count($x/artistas/artista) > 1
  4. return
  5.  <cd id = "{$x/@id}">
  6.    {$x/artistas/artista}
  7.  </cd>'
  8. PASSING CatalogoCD RETURNING CONTENT
  9. ) AS Mas1Autor
  10. FROM Categorias
  11. WHERE NombreCategoria = "Discos más Populares"
Advertisement
Add Comment
Please, Sign In to add comment