Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SPT Statement For a Particular Record from a Set
Message
De
14/10/2016 15:38:30
Steven Dyke
Safran Seats USA
Texas, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
SPT Statement For a Particular Record from a Set
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008 R2
Network:
Windows Server 2008 R2
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01641968
Message ID:
01641968
Vues:
45
I have a table where a job number field can have multiple records. It has a field also that holds an archive flag.

I need a SQL statement that will only result in a list of job numbers that when grouped together not one of them has an archive flag value of 0.

The following will give me job numbers that I do not desire. Because for instance job number MES4000 is listed 3 times with two records with archive flag set to 1 an one record set to 0.
So I would not want this in my result.
testconnString = "Select Distinct jobno, archivef From webprddt1.resmngta0" +;
				" Where posstr(jobno,'MES') > 0 And archivef = 1"
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform