Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select record
Message
De
02/09/2012 09:35:02
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
02/09/2012 02:37:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01552214
Message ID:
01552231
Vues:
47
>>>I have table namely "master_py_engg" having fields with 1.Regno(C) 2. Name(C) 3. Category(C) 4. Age(I). The category field contain the value 1. GE 2. MBC 3. OBC 4. SC.
>>>
>>>I want to select the age > 21 for category equal to (GE,MBC,OBC) and select age > 24 for category equal to (SC).
>>>
>>>awaiting yours valuable reply
>>
>>
>>select * from Master_py_Engg where Age >21 AND Category IN ('GE','MBC', 'OBC');
>>                                             OR  Age > 24 AND Category = 'SC'
>>
>
>Probably need parentheses around the ORed expression.

No. AND has a higher precedence, just as multiplication has a higher precedence than addition. However, parentheses can help make it clearer to read the program.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform