I have a scenario that I cant figure out.
I have a sold at table that I need to populate with an item number and all the locations this item sold at. So I want the item sold at field to be a string field of some length say 100 characters. I would go through my sales detail table and if I find a record where an item is sold I would right the location number into the Sold At field. But as I read through the sales detail table and I find another instance where this item has been sold I want to skip if this location is already in that Sold At field but if not I want to add a space and then the next location found.
IE the fields would look like this if 4 locations sold this item 101 102 316 433
Would there be a way to accomplish this using SQL?
For the final report that the sold at table is used in I want to display this Sold At field as shown above.