Sql querys to foxpro

hi is ist posible to get data from a Fox / Sql database with the querysyntax of the database / driver and use db-oriented functions like empty() iif() a$b and so on.
in servoy i get a lexical error.

ie: lc_w2=" where av.dr1$‘J1j’ and !empty(xy) "

thanks frank