> >
> > You can use Like() in a SQL statement, but it's an "xBase" function.
> > SQL has a native Like operator, which might be preferable I think
> > What do you want to do exactly?
> >
> >
CREATE CURSOR temp (test Char(20))
> > INSERT INTO temp VALUES ("Smith")
> > INSERT INTO temp VALUES ("Smythe")
> > SELECT * FROM temp WHERE LIKE('*it*',test)
> > SELECT * FROM temp WHERE test LIKE '%it%'
> >
> >
> >
> > hth
> > -Stefan
>
>
> SELECT IDNO,FNAME,LNAME FROM INVOICE WHERE IDNO<>' ' AND
<B>LIKE(XNAME,FNAME)</B>
INTO CURSOR REP_CURSOR
>
> where 'XNAME' is a selected FNAME
Yes, that would be a good occasion to use the native SQL Like operator, i.e. to do it as in the 5th line in the example above.
IOW, if "xname" is a variable, then fill it with your desired string, add a '%' on the right side (and another one on the left if you want).
CREATE CURSOR invoice (fname Char(20))
INSERT INTO invoice VALUES ("Smith")
INSERT INTO invoice VALUES ("Smythe")
LOCAL xname
xname = '%ith%'
SELECT * FROM invoice WHERE fname Like ?m.xname
hth
-Stefan