Hi!
I am sorry I had a typo in my code and hence it did not work in VFP.
Thanks.
Sarosh
>It returns correctly one row with following test. What result do you get running it?
>CREATE CURSOR Test (idtest I autoinc, filename C(20))
>INSERT INTO TEST (filename) VALUES ("1234_abcd.txt")
>INSERT INTO TEST (filename) VALUES ("5678xabc2.txt")
>Select * From test Where filename like '%^_abc%.txt' escape '^'
>
>
>>
>>
>>Select * From test Where filename like '%^_abc%.txt' escape '^'
>>
>>
>>The above Select statement works fine in SQL 2005 getting only the 1st row (1234_abcd.txt). It looks like the escape clause is not supported in VFP so how can I do this is VFP 9.0?
>>
>>I basically want to specify that the '_' (underscore) character mentioned in the like string should be treated as a literal and not as a wildcard character.
>>
>>
>>Table: test
>>idtest int
>>filename varchar(50)
>>
>>Data:
>>idtest filename
>>------ --------
>>1 1234_abcd.txt
>>2 5678xabc2.txt
>>
>>
>>
>>Sarosh