Re: [SQL] 2 tables, joins and same name...

2001-09-04 Thread Jeff Eckermann
I learned SQL from Sam's "Teach Yourself SQL in 21 Days", and am happy to recommend it. Which book is "best" is very subjective and situation dependent; all I can say is that this one did the job for me. Pros: clearly written; knowledgable authors; good coverage Cons: all due to space limitations

Re: [SQL] 2 tables, joins and same name...

2001-09-03 Thread Josh Berkus
Ross, > I haven't seen _any_ of these books for over a year, and know a lot > more > SQL than I did then, so take any recommendations with a grain of > salt. Hmmm... both of these books get good reviews. Is there anywhere (say, techdocs) where we could add a book list? I'll ask ... -Josh __

Re: [SQL] 2 tables, joins and same name...

2001-09-01 Thread Ross J. Reedstrom
On Sat, Sep 01, 2001 at 09:44:19AM -0700, Josh Berkus wrote: > Ross, > > > Have you seen "Database Design for Mere Mortals" by Michael > > Hernandez? > > Yeah, that's one I've been loaning out a lot. However, while it does > cover a lot of good stuff about how to design a database, it never get

Re: [SQL] 2 tables, joins and same name...

2001-09-01 Thread Josh Berkus
Ross, > Have you seen "Database Design for Mere Mortals" by Michael > Hernandez? Yeah, that's one I've been loaning out a lot. However, while it does cover a lot of good stuff about how to design a database, it never gets past the most elementary SQL ... really, no further than Bruce gets. And

Re: [SQL] 2 tables, joins and same name...

2001-08-31 Thread Ross J. Reedstrom
On Fri, Aug 31, 2001 at 08:29:21AM -0700, Josh Berkus wrote: > > That's why we have the list. Personally, I'm still looking for a > comprehensive introductory SQL book to recommend. The ones I know are > either too simple and not that accurate (SQL for Dummies), proprietary > (MS SQL Server in

Re: [SQL] 2 tables, joins and same name...

2001-08-31 Thread Stephan Szabo
On Thu, 30 Aug 2001, Marc [iso-8859-1] André Paquin wrote: > Hello, > > Here is 2 tables: > > airport > - > airport_id > name > code > city_id > > destination > --- > destination_id > dest_name > ... > airport_dep_id // using airport.airport_id (departure) > airport_arr_id //

Re: [SQL] 2 tables, joins and same name...

2001-08-31 Thread Josh Berkus
Marc, > I dont know how to formulate my SQL query... I want to select the > destinations in the destination table with not the ID of each airport > but their names. I can do a join with one but with the second one, I > get > no results... And this is confusing! Whenever you want to join to the

Re: [SQL] 2 tables, joins and same name...

2001-08-31 Thread Thomas Rehlich
Marc André Paquin wrote: > Here is 2 tables: > > airport > - > airport_id > name > code > city_id > > destination > --- > destination_id > dest_name > ... > airport_dep_id // using airport.airport_id (departure) > airport_arr_id // using airport.airport_id has well (arrival)

Re: [SQL] 2 tables, joins and same name...

2001-08-31 Thread Josh Berkus
Marc, > Yes, but I used this instead: > select dest.dest_name, air1.name as airport1, air2.name as airport2 > from > destination, airport air1, airport air2 where dest.airport_dep_id= > air1.airport_id and dest.airport_arr_id=air2.airport_id; > > This is very similar to your query... I think the

Re: [SQL] 2 tables, joins and same name...

2001-08-31 Thread Richard Poole
On Thu, Aug 30, 2001 at 04:25:41PM -0400, Marc André Paquin wrote: > Hello, > > Here is 2 tables: > > airport > - > airport_id > name > code > city_id > > destination > --- > destination_id > dest_name > ... > airport_dep_id // using airport.airport_id (departure) > airport_arr

[SQL] 2 tables, joins and same name...

2001-08-31 Thread Marc André Paquin
Hello, Here is 2 tables: airport - airport_id name code city_id destination --- destination_id dest_name ... airport_dep_id // using airport.airport_id (departure) airport_arr_id // using airport.airport_id has well (arrival) I have 2 columns in the second table that uses th