Hello,
I have a table(activetasks) that has a column(truck id) which is a foreign key from the trucks table. I am trying to left join the two tables so that instead of the ID showing up in a display table in my app, the name of the truck shows instead. both tables have a description column. I am using tablename.column to select the data in my query. However, my output is only selecting the trucks.description. I am new to Postgres so it is probably me but any help is greatly appreciated. The unexpected behavior is that the activetasks.description is populated with the trucks.description. So I'm missing one of my description columns.
select activetasks.subject,activetasks.description,activetasks.duedate,activetasks.assignedto,activetasks.status,activetasks.notes,trucks.description from activetasks left join trucks on activetasks.truckid = trucks.id where activetasks.status <> 'Completed'