Hi
I have the following SQL to define a Query as the inner join of two tables. How can I modify it to only include certain fields from each table?
For example, lets say I only want field "Dave1" from tbl_UniFi_Pipeline1 and field "Steve1" from tbl_QRM_Pipeline?Code:CurrentDb.QueryDefs("qry_Test1").SQL = "SELECT * FROM tbl_QRM_Pipeline INNER JOIN tbl_UniFi_Pipeline1 ON tbl_QRM_Pipeline.Loan_Number = tbl_UniFi_Pipeline1.App_Number"
Thanks!!
Is your code running too slowly?
Does your workbook or database have a bunch of duplicate pieces of data?
Have a look at this article to learn the best ways to set up your projects.
It will save both time and effort in the long run!
Dave
Rather than "SELECT * FROM ..."
phrase it as
"SELECT tbl_UniFi_Pipeline1.Dave1, tbl_QRM_Pipeline.Steve1 FROM ..."
Ok, great. Rather than saying:
"tbl_QRM_Pipeline INNER JOIN tbl_UniFi_Pipeline1"
can I just put:
"tbl_QRM_Pipeline, tbl_UniFi_Pipeline1"
I'm seeing different options when I google, but I don't know if there is a difference in the results.
Thanks
Is your code running too slowly?
Does your workbook or database have a bunch of duplicate pieces of data?
Have a look at this article to learn the best ways to set up your projects.
It will save both time and effort in the long run!
Dave
I've never seen "tbl_QRM_Pipeline INNER JOIN tbl_UniFi_Pipeline1" replaced by "tbl_QRM_Pipeline, tbl_UniFi_Pipeline1" as a similar functioning join. INNER JOIN shows the intersections between the two tables - only the matches - related by Loan_Number and App_Number. The other "join" shows the Cartesian product between the two tables (table1 records * table2 records). It's really not a join - it's just two tables with no defined relationship between them. In 4 years of db development I think I've used it once.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks