Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
User Functions
Message
De
04/09/2001 10:30:09
 
 
À
04/09/2001 10:20:50
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00552046
Message ID:
00552050
Vues:
19
Hello Steven.

>> I am creating a cursor with a select statement. Several of my cursor columns are functions that scan a table based on the current cursor record info. Example: Field 1 is a drawing number. This drawing number can be associated with many Data Submittal Index Numbers which we call EDR's. The edr data info is in a seperate table.

>> In a given record I want to know the maximum date that a submittal was made on any affected EDR, who is responsible for this submittal, what is the EDR description, etc. The only way I know to get each one of these pieces of info into a column is to have funtions for each. This means the table is scaned over an over which makes it slow to generate the cursor. Please let me know if there is another way. <<

Assuming the EDR table has a field named "dSubmitted" and the main table is named "Drawing":
SELECT MAX(e1.dSubmitted), ;
       d1.cDrawingID ;
   FROM drawing AS d1 ;
      LEFT JOIN edr AS e1 ON e1.iDrawingID = d1.iID ;
   ORDER BY d1.cDrawingID ;
   GROUP BY d1.cDrawingID
Brad Jones
Ariel Computing, Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform