List:General Discussion« Previous MessageNext Message »
From:Richard Reina Date:January 25 2001 1:36am
Subject:Help Pub Crawl display
View as plain text  
 PUB TABLE		 			  EVENT TABLE	
|p_id|pub_name 	   	|address         |        |eventid|date	     
|host_id|
|13  |John Barleycorn's |1800 N. Lincoln |        |321    |2001-01-27 |
32    |
|26  |Harry Carry's     |300 N. Dearborn |        |198	  |2001-02-21 |
0     |
|67  |Cubby Bear        |3500 N. Clark   |	  |369	  |2001-02-23 | 39   
|
|45  |Wrightwood Tap    |600 Wrightwood  |	
|21  |River Shannon     |3500 N. Clark   |	

  HOST TABLE        				   STOP TABLE
|host_id|host_name	|phone		|	|event_id|p_id  	|sequence     |	
|39	|Pamela Anderson|562-698-5473   |       |321	 | 13	        |
2           |
|51	|Tom Cruise	|212-369-2391	|	|321	 | 67           | 1           |
|32	|Sammy Sosa	|312-365-7777	|	|321	 | 26           | 3           |
						|198	 | 21		| 1	      |
						|198	 | 45		| 2    	      |
						|198     | 67		| 3	      |
						|369	 | 13		| 1	      |							|369	 | 21		| 2	      |
						|369	 | 45		| 3	      |	 	 				

I am trying to do a select that would allow me to display the following:

	** UPCOMING PUB CRAWLS **

Event  
ID	Beginning	Ending		Date		Hosted By
321	Cubby Bear	Harry Carry's   01-27-01	Sammy Sosa
198	River Shannon	Cubby Bear	02-21-01	unassigned
369	John Barleycorn Wrightwood Tap  02-23-01	Pamela Anderson


My select statement below is not cutting it and I beginning to wonder if
what I want to do can be done with a select statement or a join.  If it
can some help me figure out how.  If it can' can someone suggest some
other way of going about it.

SELECT e.eventid, e.date, e.host_id, p.name h.name
FROM event e, pub p, host h, stop s
WHERE e.eventid=s.event_id
AND s.p_id=p.p_id
AND e.host_id=h.host_id
Thread
Help Pub Crawl displayRichard Reina26 Jan
  • RE: Help Pub Crawl displayScott Gerhardt26 Jan
    • Re: Help Pub Crawl displayRichard Reina26 Jan
      • RE: Help Pub Crawl displayScott Gerhardt26 Jan
  • Re: Help Pub Crawl displayHarald Fuchs28 Jan