ameliabob Posted December 29, 2014 Share Posted December 29, 2014 I am not sure whether I am formatting this correctly or there is an undocumented restriction. What I am trying to do is to do a search in subfiles to find anything with "Tab" in the contents field and then do an inner join to the filenames table to get its contents. SELECT subfiles.contents, subfiles.masterId, filenames.rowId, filenames.contents FROM subfiles where subfiles.contents like'%Tab%' inner join filenames on filenames.rowId=subfiles.masterId Link to comment Share on other sites More sharing options...
davej Posted December 29, 2014 Share Posted December 29, 2014 I'm really rusty on this stuff. How does that differ from... SELECT s.contents, s.masterId, f.rowId, f.contents FROM subfiles s, filenames fWHERE f.rowId=s.masterIdAND s.contents LIKE '%Tab%' Link to comment Share on other sites More sharing options...
ameliabob Posted December 30, 2014 Author Share Posted December 30, 2014 Thanks for your suggestion. It worked. It looks like the WHERE always is the last condition. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now