Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete extra rows
Message
De
26/03/2008 14:35:37
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Delete extra rows
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01305862
Message ID:
01305862
Vues:
43
Hi All,

I need your help again..

What I need to do in SSMS

•I have to compare 2 tables (inMast – Part table, inCros – Cross Reference)
•Delete the extra rows from Cross Reference (inCros) which doesn’t exit in Part table (inMast)


Although I’m working on a test database I’m little concern on deleting data . So I just did a Select statement to see all matching records in both tables.

Could one of you please guide me here? How to delete the extras from incros ???

This is my select statement..

SELECT incros.fpartno, incros.fcpartrev
FROM incros
Inner JOIN
inmast
ON UPPER(incros.fpartno) + UPPER(incros.fcpartrev) = UPPER(inmast.fpartno) + UPPER(inmast.frev)
AND UPPER(incros.fnumber) = UPPER(inmast.custno1)
AND UPPER(incros.fcrosspart) = UPPER(inmast.cpartno1)
WHERE (incros.fctype = 'C')

TIA

- Jeana -
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform