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, 01:31 PM
Post
#2
|
|
|
UtterAccess VIP Posts: 7,646 From: South coast, England |
(IMG:style_emoticons/default/yw.gif)
Paul and I are always pleased to help. Good luck with your project. |
|
|
|
kashifmalik Join Data From 2 Tables Feb 24 2012, 04:49 AM
pere_de_chipstick Hi kashifmalik
I don't believe you can hide t... Feb 24 2012, 04:56 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![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 18th June 2013 - 07:08 PM |