Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
SQL finding differences
Versions des environnements
I have a sales table that has fname,lname,mname,cust_nbr and sales data for each item purchased. Each customer can be in the table multiple times, but his name - lname+fname+mname - should uniquely identify the client and the cust_nbr should also uniquely idenitfy the client. But in my sales table, I think there are are customer names - fname+lname+mname - that have different cust_nbr. How can I write a query to find where f_name+lname+mname are the same, but where they have different cust_nbr?
jim,henry,smith,12345
jim,henry,smith,44444 && not good, should have 12345 as the cust_nbr
Thanks
Brenda
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement