Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 3 tables, lots of brain ache

Author  Topic 

neurotopia
Starting Member

3 Posts

Posted - 2010-05-27 : 18:54:53
I'm generally OK when just dealing with 2 tables, but I added a third and am unsure how to retrieve the information I need. Here is the basic structure:

people table
-------------
uid
fullname
category


events table
-------------
eid
event name
event place
event time


attendance
-------------
id
uid
eid

What I'm trying to do is list each event followed by a comma separated list of fullnames sorted by category. So the output would look something like:

event name
category1: fullname, fullname, fullname
category2: fullname, fullname, fullname, fullname
category3: fullname

I am totally stumped and would greatly appreciate any help.

I think, therefore I suffer.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-05-27 : 21:13:51
the format you need can be very easily obtained using a reporting tool. do you need help with query? also whats the reporting tool that you're using now?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

neurotopia
Starting Member

3 Posts

Posted - 2010-05-28 : 00:11:44
I'm not entirely certain what you mean by "Reporting Tool". I'm writing the PHP for a website and to access the MySQL DB. I don't use any 3rd party commercial or WYSIWYG software -- just Gedit and my Linux console.

I apologize for my lack of familiarity with the terminology, I'm still quite new to all this.

I think, therefore I suffer.
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-05-28 : 01:43:41
This is a MS SQL Server forum and I think you can get much better help in a php/MySQL forum.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

neurotopia
Starting Member

3 Posts

Posted - 2010-05-28 : 09:58:07
oh crap! sorry about that! (LOL... told ya i was a noob!)

I think, therefore I suffer.
Go to Top of Page
   

- Advertisement -