I have two tables (msglog and msgtbl) I want do join together. On both table, I 
have the following common fields:

iDeviceId  Integer
iGroupId   Integer
iCodeId    Integer
tMsg        Text

When I enter the following command, the table joins together but there is a lot 
of fields in msgtbl that I dont need:

select * from msglog
left outer join msgtbl
on msglog.iDeviceId == msgtbl.iDeviceId
and msglog.iGroupId == msgtbl.iGroupId
and msglog.iCodeId  == msgtbl.iCodeId

On the second table, I just need the field tMsg so I changed the command for 
the following:

select * from msglog
left outer join (select tMsg from msgtbl)
on msglog.iDeviceId == msgtbl.iDeviceId
and msglog.iGroupId == msgtbl.iGroupId
and msglog.iCodeId == msgtbl.iCodeId

When I do this, I get the following error:
Error no such collumn: msgtbl.iDeviceId

Can you tell what is wrong with this last select command?

Thank you,
Yves Plasse.

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

Reply via email to