I think I have not given clear enough info ...
Let's take what I have already said and make some change:
----------------------------------------------
Imagine I have a table filled with records from different source, and some fields of this table have a different meaning depending on the source, for example:
Num Source Name Info1 Info2
1 Site1 Smith single ski
2 Site2 Willis NewYork lawyer
...
In this example, field 'Info1' means 'personal status' when record is from 'Site1' and means 'City' when record is from 'Site2'. In the same way, field 'Info2' means 'hobby' when record is from 'Site1' and means 'profession' when record is from 'Site2'.
Imagine I have a table making the link:
Source FieldName FieldLinkedName
Site1 Info1 'Status'
Site2 Info1 'City'
Site1 Info2 'Hobby'
Site2 Info2 'Profession'
------------------------------
To be more precise I have a destination table with the following columns:
Num Source Name Status City Profession Hobby
And I want to fill this table with a query of this kind:
"SELECT USER.Num, USER.Source, USER.Name,
columnvalue(SELECT LINK.FieldLinkedName
WHERE LINK.Source = USER.Source
AND LINK.FieldName='Status') AS Status,
columnvalue(SELECT LINK.FieldLinkedName
WHERE LINK.Source = USER.Source
AND LINK.FieldName='City') AS City,
columnvalue(SELECT LINK.FieldLinkedName
WHERE LINK.Source = USER.Source
AND LINK.FieldName='Profession') AS Profession,
columnvalue(SELECT LINK.FieldLinkedName
WHERE LINK.Source = USER.Source
AND LINK.FieldName='Hobby') AS Hobby
FROM USER"
Here "columnvalue('x')" would be a function to retrieve the info in the column that has name 'x'.
I hope this is more explicit ... Thank you again if you have an idea