UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

> Join Data From 2 Tables, Office 2007    
 
   
kashifmalik
post 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)
Attached File  query.jpg ( 19.36K ) Number of downloads: 9
 
Go to the top of the page
 
+
 
Start new topic
Replies
pere_de_chipstic...
post Feb 24 2012, 01:31 PM
Post #2

UtterAccess VIP
Posts: 7,584
From: South coast, England



(IMG:style_emoticons/default/yw.gif)
Paul and I are always pleased to help.
Good luck with your project.
Go to the top of the page
 
+

Posts in this topic


Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 20th May 2013 - 10:57 AM