El lun, 05-02-2007 a las 09:11 +0100, Marcel Reutegger escribió: > Paco Avila wrote: > > I think that these queries equivalents: > > > > XPATH: //element(*, okm:document)[jcr:contains(okm:content, 'naranjas')] > > > > and > > > > SQL: SELECT * FROM okm:document WHERE CONTAINS(okm:content, 'naranjas') > > > > But the XPATH one works and the SQL doesn't return anything. > > Those two queries are not equivalent. okm:content in the XPath case refers to > the name of a node, whereas in SQL okm:content by definition refers to a > property. > > Only when you use XPath you can define whether a path refers to a node or a > property using the @ (attribute axis). There's no such facility in SQL, > therefore a relative path in a contains function always references a property. > > But I'm open to suggestions how the XPath query could be mapped to SQL.
So, actually there is no SQL equivalent for this XPATH query? -- GIT Consultors S.L. c\ Francesc Rover 2-B 07003 Palma de Mallorca (Illes Balears)
