Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using WHERE with wildcard specifications and LIKE
Message
 
To
25/04/2001 14:12:36
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00499748
Message ID:
00499807
Views:
23
Nechemiah,

If you dont care about what there is in cGroup2 why including it in your condition?

Wouldn't SELECT * FROM xxx WHERE cGroup1=='AJ ' do de job? (there is a space in 'AJ '

Hugo


>Given the following records in XXX (there is a tag cGroup1+cGroup2+...), I
>am trying to select the records where cGroup1==AJ (not including AJA) regardless of whether there is anything in cGroup2
>
>cGroup1 C(3) cGroup2 C(3)
>AB
>AJ
>AJ
>AJ AA
>AJ AB
>AJA
>AK
>
>SELECT * FROM xxx WHERE cGroup1+cGroup2 LIKE 'AJ % '
>(where there is a space between J and %)
>returns the records where cGroup2 is not blank
>
>SELECT * FROM xxx WHERE cGroup1 LIKE 'AJ ' and cGroup2 like '% '
>returns records where cGroup1==AJ
>
>What is the difference between the 2 select commands? I assume the 2nd
>command will not use Rushmore, since the WHERE is not the exact key.
>
>I would appreciate any help or suggestions.
>
>Thanks,
>Pessy Butler
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform