Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Escape character in SQL Select
Message
 
 
À
04/03/2006 15:25:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01101515
Message ID:
01101522
Vues:
12
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
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform