Hi Sergiu,
thank you so much for your help,
the "wanted pages" query works fine if I use it for certain spaces:

#set($sql= "select link.fullName, link.link.id from XWikiLink link where
link.fullName like 'MySpace.%' and not exists
(select doc.fullName from XWikiDocument doc where doc.fullName =
link.id.link) order by 1")

#set($results= $xwiki.search($sql))
#if ($results.size() == 0)
#warning('Es gibt keine gewünschte Seiten')
#else
{table}
Space|Document|Link
#foreach ($row in $results)
  #foreach ($col in $row)
    #if ($velocityCount==1)
     #set($docFullName=$col) 
    #elseif ($velocityCount==2)
     #set($emptyLink=$col)
     #set($el=$emptyLink.getLink())
     #set($spaceName=$xwiki.getDocument($docFullName).space)
     #end
  #end
$spaceName|[$docFullName]|$el
#end
{table}
#end

Best Regards,
Alla


Sergiu Dumitriu-2 wrote:
> 
> 
> This should work:
> 
> #set($query = "select link.id.link from XWikiLink link where not exists
> (from XWikiDocument doc where doc.fullName = link.id.link)")
> #foreach($item in $xwiki.search($query))
>  * $item
> #end
> 
> Note that several bad entries are placed there because the link
> detection process does not pre-run velocity, so lots of entries actually
> point to velocity variables or javascript code. Definitely the backlinks
> need to be revised in the new rendering.
> 
> Sergiu Dumitriu
> http://purl.org/net/sergiu/
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/Please%2C-badly-need-help-with-HQL...-tp1493848p1499075.html
Sent from the XWiki- Users mailing list archive at Nabble.com.

_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to