Hi Scott,

I'm afraid that the problem here is that you are invoking "like" as if it
were a function.
Wrongly, the parser is allowing you to do this in the first case (I guess
you are using v 2.0.x, because in 2.1 the parsing is more strict, so I
expect it to fail also in the first case).
You can try just removing the parenthesis:

select * from person where firstname like 'W%'  or lastname like 'W%'

Regards

Luigi


2015-05-21 8:11 GMT+02:00 Scott Wruble <[email protected]>:

> Why does this work:
>
> select * from person where firstname = 'William' or lastname like('W%')
>
> but this produces an error:
>
> select * from person where firstname like('W%') or lastname like('W%')
>
> "Invalid keyword 'OR' command"
>
> I have also tried:
>
> select * from person where [firstname,lastname] like('W%')
>
> Or, is there a different method of wildcard searching multiple fields?
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to