I couldn't think of a good way to word the title, if anyone can come up with something better please feel free. Basically there is an old VB6 app that pulls data from a db that I have more or less completely restructured and gives the user a dump of all of the product information at once. So I need to do some inner joins to get all of these tables together. I know how to do basic inner joins but I am stuck on one detail. There are a few tables where there are multiple entries for each item. For example, the CrossReference table may have multiple cross reference numbers for an item, or it may only have one, or it may have none at all. Is it possible to have those placed dynamically into separate columns. so this:
Item CrossReferenceNumber
XXXXX crossref1
XXXXX crossref2
XXXXX crossref3
could become this (after a join with some other tables):
Item BasePart Size CrossReferenceNumber1 CrossReferenceNumber2 CrossReferenceNumber3
XXXX XXXX Large crossref1 crossref2 crossref3
But if there were no cross references, there would be no cross reference columns. Is something like that possible or am I dreaming?