Joining Datasets using columns
Posted on 2003-10-31
I am looking for a way of joining or merging two datasets together in VB.net.
Essentially I have two separate datasets, which have been populated
with data from a CSV file. The example below gives an Idea of
structure of both datasets.
Code, Name, Spend
A45 5, tyyy, 0.56
B65 5, YUTYU, 0.78
H74 0, GFGHHG, 0.59
Code, Data1, Data2, Data3
A45 5, Data, Data, Data
B65 5, Data, Data, Data
H74 0, Data, Data, Data
What I am trying to do is join the two data sets together using in the Code
field (This is same as a vlookup in excel or a join in SQL). This
would then produce another dataset with the merged datasets which I can then
export to another CSV file.
Code, Name, Spend, Data1, Data2, Data3
A45 5, tyyy, 0.56, Data, Data, Data
B65 5, YUTYU, 0.78, Data, Data, Data
H74 0, GFGHHG, 0.59, Data, Data, Data
I have a SQL version but this is done in a store procedure. I really need
to do this using flat files (csv) outside of SQL in a standalone application.
Also with the number of records being over 100,000 I can not use excel.
Does anyone have any ideas? Also if anyone can think of an alternative way of
doing this the please let me know!!
Thanks in advance!!