Please start any new threads on our new 
    site at https://forums.sqlteam.com.  We've got lots of great SQL Server
    experts to answer whatever question you can come up with.
    
        | 
                
                    | 
                            
                                | Author | Topic |  
                                    | dzsondzsiStarting Member
 
 
                                        3 Posts | 
                                            
                                            |  Posted - 2009-08-04 : 05:12:24 
 |  
                                            | Hi,Could anyone help me please, as I got stuck with my limited SQl knowledge.So, I should check values in 2 SQL tables, whether they are - the same in the fields with the same name- if not, then there is a mapping table storing the source field name and value and the target field name and value pairs.E.g.a pair could be:Source_fieldname: Name1Source_fieldvalue: JohnTarget_fieldname: Name1Target_fieldvalue: JennyIf the target field value is John, it is faulty and should appear in a new table as bad data.Any possibility to do it with SQL?Then, to make it more difficult, there are fields when there is another field with different values to check.e.g.:Source_fieldname: Name1Source_fieldvalue: JohnTarget_fieldname: PlaceTarget_fieldvalue: JennyIn this case both tables contain a field named Name1 and a field called place, and they should both be the same in both tables.THXGyöngyi |  |  
                                |  |  |  |