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.

 All Forums
 Other Forums
 MS Access
 Field name as parameter

Author  Topic 

dzsondzsi
Starting 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: Name1
Source_fieldvalue: John
Target_fieldname: Name1
Target_fieldvalue: Jenny
If 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: Name1
Source_fieldvalue: John
Target_fieldname: Place
Target_fieldvalue: Jenny
In this case both tables contain a field named Name1 and a field called place, and they should both be the same in both tables.

THX


Gyöngyi
   

- Advertisement -