0
I ont deux tables de données disent CSVData et SQLData je veux comparer ce disque à deux tables de données est-il même ou pas si j'utilise cette requêtedynamique requête LINQ sur la table de données
var matched = from table1 in cSVData.AsEnumerable()
join table2 in sqlData.AsEnumerable() on
table1.Field<string>("GlobalRank") equals table2.Field<string>("GlobalRank")
where
table1.Field<string>("GlobalRank") == table2.Field<string>("GlobalRank")
|| table1.Field<string>("TldRank") == table2.Field<string>("TldRank")
|| table1.Field<string>("Domain") == table2.Field<string>("Domain")
|| table1.Field<string>("TLD") == table2.Field<string>("TLD")
|| table1.Field<string>("RefSubNets") == table2.Field<string>("RefSubNets")
|| table1.Field<string>("RefIPs") == table2.Field<string>("RefIPs")
|| table1.Field<string>("IDN_Domain") == table2.Field<string>("IDN_Domain")
|| table1.Field<string>("IDN_TLD") == table2.Field<string>("IDN_TLD")
|| table1.Field<string>("PrevGlobalRank") == table2.Field<string>("PrevGlobalRank")
|| table1.Field<string>("PrevTldRank") == table2.Field<string>("PrevTldRank")
|| table1.Field<string>("PrevRefSubNets") == table2.Field<string>("PrevRefSubNets")
select table1;
Mais ce nom de la table des colonnes doivent être des moyens dynamiques où la clause devrait prendre tout nom de colonne
Si vous testez sur "" GlobalRank "' puisque vous utilisez une jointure, vous obtiendrez toutes les lignes de jointure et le reste des conditions n'aura aucune importance. – NetMage