[xquery-talk] if statements within where clauses?
jonathan.robie at datadirect.com
Wed Jun 14 15:28:26 PDT 2006
Ooops, I forgot the "then" keyword:
where contains($text, $keyword)
and if ($var ='all')
$entries//classcode = $region
But you probably caught that error ;->
Jonathan Robie wrote:
> Hi Cindy,
> XQuery allows expressions to be combined very freely, and you can
> certainly use an if expression for conditional logic in a WHERE
> clause, as follows:
> where contains($text, $keyword)
> and if ($var ='all')
> $entries//classcode = $region
> I did not understand what you are trying to do well enough to know
> exactly what the query should look like.
> Hope this helps!
More information about the talk