General information
Forum:
Microsoft SQL Server
Environment versions
SQL Server:
SQL Server 2005
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only