I'm loading a vb.net datagridview from an SQL 2000 table. Some of the records have an exception code that I display in the grid. This is working fine with the code in the main table. Now I am moving the exception codes to their own table to allow more than one code per record and I only want to show the main record once. I would like to display a blank if there are no exceptions, the exception code if there is only one, and "* Multiple" if there is more than one. I'm not sure how to approach selecting the records to generate this text. I could do a sub query of the exception codes using the value of a count() and group by PK to generate the text and then join it to the main table. Is there a better method of doing something like this that wouldn't use a sub query? FYI: most of the records will not have any exception codes.
Auguy
Sylvania/Toledo Ohio
Auguy
Sylvania/Toledo Ohio