On 18/04/2009 8:24 AM, flakpit wrote:
>> SELECT pubs.* from pubs, notes, publishers WHERE ...
> 
> Thanks, but it didn't work the way I expected it to:)
> 
> Now I have my query laid out  a lot better and can 'slim' it down from here
> 
> SELECT * FROM pubs
> INNER JOIN notes
> ON pubs.note_id=notes.note_id  ; notes.

I presume the "; notes." on the end of the above line is not meant to be 
there.

> INNER JOIN publishers
> ON pubs.publisher_id=publishers.publisher_id
> WHERE pub_title LIKE '%salem%'
> 
> How do I return only the matching notes.note_notes field in that join and no
> the rest of the fields in notes?
> 
> How do I return only the matching publishers.publisher_name field in that
> join and not the rest of the fields in publishers?
> 
> Probably still explaining myself very badly here. Oh well.

Either that or you need to work through an elementary SQL tutorial ... 
e.g. see http://www.w3schools.com/Sql/sql_join_inner.asp

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to