Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Delete extra rows
Message
From
26/03/2008 14:35:37
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Delete extra rows
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01305862
Message ID:
01305862
Views:
44
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 -
Next
Reply
Map
View

Click here to load this message in the networking platform