I have a sqlite database avalible here => https://www.dropbox.com/s/9cn093ns3ot2cik/drinks.db?dl=0
I'm trying to show ( or replace?) the drinks.glass_id
with its proper name from glasses.name
I have tried
select drinks._id DID,
drinks.glass_id GID,
glasses.name GNAME,
glasses._id GIDD
from drinks DRNKS
join glasses GLS
on drinks.glass_id = glasses._id
What is wrong??
I have spent several hours looking this up.
I have read these links and still cant figure it out.
http://community.spiceworks.com/topic/242166-sql-query-help-convert-category-id-to-the-text-name
Replacing a pulled SQL ID value with its name from another table
How to replace fetched values with another column while querying with SQL Server 2008 R2
how to get name from another table with matching id in another table?