Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sql command
Message
 
À
24/07/2006 15:13:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Pro
Database:
MS SQL Server
Divers
Thread ID:
01139315
Message ID:
01139407
Vues:
15
I don't think you misunderstood, maybe this is exactly what Mark wants, but I am not sure :o)
(Maybe my thinking is too complex today :o)))))


>I sure do have a typo - it was supposed to be:
>
>SELECT field1 FROM table1 WHERE (alltrim(field2) $ field1)
>
>I thought that was what he wanted? I thought he wanted a result of all records where the 2nd field existed anywhere inside the first field. I guess I really misunderstood! (thanks for catching the typo Borislav!)
>
>
>
>>>There is a better way I'm sure:
>>>
>>>SELECT field1 FROM table1 WHERE (alltrim(field1) $ field1)
>>>
>>>
>>>>hi all,
>>>>i have a friend who is trying to do a sql command but is not having any luck. basically he wants to return field1 from table 1 where field2 occurs in field1. i am not great with sub querys but is this easy/possible to do? i suppose it would go something like in pyudocode
>>>>
>>>>select table1.field1 from table1 where table1.field2 is found anywhere in table1.field1
>>>>
>>>>~M
>>
>>That would gives you only these records where Field2 is contained in Field1. i.e.
>>
>>Field1                    Field2
>>-------------------------------
>>This is a test             is
>>This is not included       Test
>>
>>
>>With your query you will get only first record. That's why I am not sure about the result Mark wants.
>>(You have a little typo in your query, you check Field1 $ Field1 :o))))
>>Also I forgot to ask Mark, did he wants case-sensitive searching or not :o)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform