Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Duvidas sql
Message
De
15/01/2003 13:03:56
Erick Miranda
Formata Data Business - Grupo Linx
Contagem, Brésil
 
 
À
15/01/2003 11:55:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00740324
Message ID:
00742017
Vues:
20
Olá!

Respondi rápido da última vez, mas a idéia é basicamente a mesma.
Você pode usar:
* Seleciona a dívida mais antiga de cada cliente
Select Codigo, Cliente, Min(Vencimento) ;
  From SuaTabela Group By Codigo, Cliente Into Cursor SeuCursor

* Pega os dados completos da dívida mais antiga
SELECT A.* From SuaTabela As A, SeuCursor As B ;
  WHERE A.Codigo = B.Codigo And A.Cliente = B.Cliente ;
  ORDER BY Cliente, Vencimento
Até mais.
Erick
Força Sempre!
Erick
Força Sempre!
Strength Always!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform