I am am experience Mainframe programmer, but new to SQL-Server & learning vb.net so I realise that this is probably very basic ...
I have a DataTable called MailTypes which contains 2 Columns, the ID & the Name.
I have a DataTable called Leagues which contains a lot of Columns, one of which is a Foreign Key linked to the MailTypes Primary Key, which I want to access once for every Row in the MailTypes Table & use the MailType Name each time through.
What is the best way to do this ?
As an example ...
MailTypeID ... MailTypeName
1 ... Pass 1
2 ... Pass 2
3 ... Pass 3
LeagueID ... LeagueName ... MailTypeID
1 ... League1 ... 2
2 ... League2 ... 3
3 ... League3 ... 2
4 ... League4 ... 1
5 ... League5 ... 1
6 ... League6 ... 3
My Output (after formatting) will be
Pass 1
League4
League5
Pass2
League1
League3
Pass3
League2
League6