Whats wrong with my SQLITE3 expression?

View: New views
2 Messages — Rating Filter:   Alert me  

Whats wrong with my SQLITE3 expression?

by Bill-Lancaster :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This is my first attempt at using INNER JOIN.

"SELECT properties.*, tenants.* FROM properties INNER JOIN tenants ON properties.PropertyID = tenants.PropertyID"

Can anyone advise?

Re: Whats wrong with my SQLITE3 expression?

by Bill-Lancaster :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I just tried the same syntax with two new tables each with the same primary key, INNER JOIN worked OK.

In my original post, properties.PropertyID is a primary key (integer) and tenants.PropertyID is integer but not a primary key.
This seems to the problem.

Any further ideas?