Click here to Skip to main content
15,867,977 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
The data set represents a primary index key column call it Name, and a second (item) then a third column/field (item alias). Each Name (store) may have 1,2,3,4---N number of rows (items). Here is how the dataset returned look like:

Name Item Alias
-------------------
Store1 Beans Bn
Store1 Rice Rc
Store1 Water Wr

Store2 Beans Bs
Store2 Water Wt

Store3 Rice Rc
Store3 Beans Bs
Store3 Bread Bd
Store3 Chips Ch

Question here how should I build the dictionary for this kind of a data set where a Name could have more than one row of data.

The idea here is to be able to search for the Name/Store and Item in order to get the Alias (as if the Key here is the combined fields of Name and Item, and the value is the Alias).
Thanks.
Posted
Updated 8-Oct-13 7:19am
v4
Comments
Azee 8-Oct-13 13:35pm    
Hey there, one idea would be to combine Name and Item with another character in the middle and use it as one key, for example, "Store1$Beans" as key.
MuhammadUSman1 9-Oct-13 2:00am    
Why you want to build dictionary which contains this type of data?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900