i have two databases…old structure and new structure…
i wrote a converter that copies data from old to new one …
my records in one of tables of old db are about 100000
(Table A in old db -> Table B in new db)
my problem is when data is copied to new db the number of records in source and destination Tables Are not equal because of my conditions of my converter / mean :
(Table A in old db = 100000-> Table B in new db = 98000)
would u plz learn me how can i write a query that show me those records that are in Table A But Are Not In Table B//
Table A & B have different Structures / But Some Of their Fields Are Map With Different Names And I should use these fields 4 select …
mean something like this :
use old,new
select * from old.A
where
old.A.name <> new.B.Name
and
old.A.pey <> new.B.Pay
and
old.A.num <> new.B.Amount
but the upper code not true (syntax) in sql server / is there any way 4 this select?
thanks in future advance
best regards
This will bring up all records from the original table which haven’t been copied over to the new table. Bear in mind that this is MySQL syntax, so you may need to adapt it for SQL Server 2008.
Obviously this assumes that
nameis a unique column. If it isn’t, you may need to post more specific detail on your particular problem.