Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Duplicação de registros - Select-SQL
Message
From
28/08/2003 17:19:17
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
28/08/2003 17:01:45
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00824370
Message ID:
00824376
Views:
17
This message has been marked as the solution to the initial question of the thread.
>Olá pessoal,
>
> Às vezes quando executo um SELECT utilizando o INNER JOIN, os registros vem duplicados. Alguém poderia explicar por que isto acontece?
>
>Atenciosamente
>
>Sinval L. F. Junior

Se um registro em uma tabela tem múltiples registros equivalentes na outra tabela, vocé terá duplicados do primeiro. É isto o caso nos seus dados?

Por exemplo:
select Cliente.ClienteId, Cliente.Nomes, Factura.Quantidade;
  from Clientes join Factura on Cliente.ClienteId = Factura.ClienteId;
  into cursor temp
... poderá mostrar múltiplos registros para cada cliente (um para cada factura).

Nao estou seguro do Portugués; factura é "invoice" en Inglés.
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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform