My Assistant
|
|
Feb 24 2012, 04:49 AM
Post
#1
|
|
|
UtterAccess Member Posts: 44 |
Hi Everyone,
I am trying to display records from 2 tables based on JOIN statement. Table 1 is (tbl_Events) and Table 2 is (tbl_Ind_detail ). There are more than one record rows in Table 2 for my primary key (RefNo) of Table 1. When I do the JOIN, my result display repeating rows from Table 1 for all the corresponding rows in Table 2 (please see the attached picture). Is there a way that my query result only display the rows once from Table 1 .. I mean if e.g. there are 3 matching records in Table 2 for my Primary Key of Table 1, the resultant query result should only show data from Table 1 ONCE and the 3 record rows from Table 2?...I hope I make sense here. Below is my SQL JOIN SELECT tbl_Events.*, tbl_Ind_detail.* FROM tbl_Events LEFT JOIN tbl_Ind_detail ON tbl_Events.RefNo = tbl_Ind_detail.RefNo; I have to export the query results to an excel sheet later. Many thanks for helping me out. This post has been edited by kashifmalik: Feb 24 2012, 04:53 AM
Attached File(s)
|
|
|
|
![]() |
Feb 24 2012, 04:56 AM
Post
#2
|
|
|
UtterAccess VIP Posts: 7,646 From: South coast, England |
Hi kashifmalik
I don't believe you can hide these results in a query, however if you display them in a report, you can set 'Hide Duplicates' property of controls in a report to 'Yes'. and then you can export that report to excel. hth |
|
|
|
kashifmalik Join Data From 2 Tables Feb 24 2012, 04:49 AM
PaulBrand No, you can't. The only way is to use a report... Feb 24 2012, 05:03 AM
kashifmalik Thank you Bernie and Paul. I will then display the... Feb 24 2012, 06:22 AM
pere_de_chipstick Paul and I are always pleased to help.
Good luck w... Feb 24 2012, 01:31 PM![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 19th June 2013 - 02:03 AM |