SQL / Reporting Help Please
October 27, 2010 10:29 AM Subscribe
I'm looking for help with either SQL or with MS Reporting Services; not sure which, to be honest. I have a table of people (userID, username), a table of vegetable(s) each person bought (userID, vegatableID), and a table of fruit(s) each person bought (userID, fruitID). I'm trying to develop a report that has column A = name, column B = vegetables bought, and column C = fruits bought; I'm running into problems.
posted by inigo2 to Computers & Internet (14 answers total) 2 users marked this as a favorite
Each person can buy 0, 1 or many fruits or veggies. I'd like the report to look like this:
Name1 -- Vegetable1 -- Fruit1
-- Vegetable2 -- Fruit2
-- Vegetable3 -- [blank]
-- Vegetable4 -- [blank]
Name2 -- [blank] -- Fruit1
-- [blank] -- Fruit2
Right now the result I'm getting is repeating either the fruits or veggies (whichever there is less of). I'm just not sure if this is a problem that should be fixed in the stored procedure called by the report, or in the formatting of the report. Tips? If any additional details are needed/wanted, just post or memail. Thanks!