Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2008

    Unanswered: Doing "LIKE" with xquery..?

    Hey guys. I'd like to use xquery to extract some data from an xml column. I need to filter the records on the content of some tags in the same manner as the standard LIKE clause. Basically, how would I tansform the following query...

    PHP Code:
    select unitIDXMLQUERY('for $e in $d/dept/employee return $e/name/text()' 
    passing  d.deptdoc as "d")
    from dept d
    where  unitID LIKE 
    'WW%' and 
    XMLEXISTS('$d/dept[@deptID = "V15"]' passing d.deptdoc as "d"); 
    so that the deptID ends (or starts or contains) with V15? (Example taken from


  2. #2
    Join Date
    Jun 2003
    Toronto, Canada
    Provided Answers: 1
    You can use the contains(), starts-with(), and ends-with() XPath functions, I guess.
    "It does not work" is not a valid problem statement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts