Hi,
When performing a large join, say on personaldetails against various other
tables where there is a one to many relationship, obviously the first table
will be repeated many times with the other's varying details.
I only want one occurence of the other tables to be shown (so every
personaldetails , but just any (random is ok) address/order/etc/).
Can this be done easily with sql?
Cheers,
Chris 5 2382
In principle you want to create GroupBy queries for your 'many' tables and
join these to the main table.
It is possible to do this in one sql statement but you may a massive
amount of sql code to handle.
I would be inclined to build saved queries for the groups and then treat
these as source table for a final query.
Regards
Peter Russell
C L Humphreys previously wrote: Hi,
When performing a large join, say on personaldetails against various other tables where there is a one to many relationship, obviously the first table will be repeated many times with the other's varying details.
I only want one occurence of the other tables to be shown (so every personaldetails , but just any (random is ok) address/order/etc/).
Can this be done easily with sql?
Cheers, Chris
"C L Humphreys" <cl*********@to ofgib.moc> wrote in message
news:bm******** **@ucsnew1.ncl. ac.uk... Hi,
When performing a large join, say on personaldetails against various other tables where there is a one to many relationship, obviously the first
table will be repeated many times with the other's varying details.
I only want one occurence of the other tables to be shown (so every personaldetails , but just any (random is ok) address/order/etc/).
Can this be done easily with sql?
Cheers, Chris
....to be shown...? Where? On the screen you might use a form/subform
whereas on paper you could use either a report/subreport or a single report
with grouping. Any reason why you specifically wanted a query to do this?
Fletcher
"Fletcher Arnold" <fl****@home.co m> wrote in message
news:bm******** **@titan.btinte rnet.com... "C L Humphreys" <cl*********@to ofgib.moc> wrote in message news:bm******** **@ucsnew1.ncl. ac.uk... When performing a large join, say on personaldetails against various
other tables where there is a one to many relationship, obviously the first table will be repeated many times with the other's varying details. I only want one occurence of the other tables to be shown (so every personaldetails , but just any (random is ok) address/order/etc/).
...to be shown...? Where? On the screen you might use a form/subform whereas on paper you could use either a report/subreport or a single
report with grouping. Any reason why you specifically wanted a query to do this?
Shown on screen, as a query. I just need the details of one table and a
segment of their involvement in other tables.
Chris
"Peter Russell" <ru***@127.0.0. 1> wrote in message
news:me******** *************** @russellscott.b tinternet.com.. . C L Humphreys previously wrote: When performing a large join, say on personaldetails against various other tables where there is a one to many relationship, obviously the first table will be repeated many times with the other's varying details. I only want one occurence of the other tables to be shown (so every personaldetails , but just any (random is ok) address/order/etc/).
In principle you want to create GroupBy queries for your 'many' tables and join these to the main table. It is possible to do this in one sql statement but you may a massive amount of sql code to handle. I would be inclined to build saved queries for the groups and then treat these as source table for a final query.
Thanks for that, sounds do-able :o)
Chris
"C L Humphreys" <cl*********@to ofgib.moc> wrote in message
news:bm******** **@ucsnew1.ncl. ac.uk... "Fletcher Arnold" <fl****@home.co m> wrote in message news:bm******** **@titan.btinte rnet.com... "C L Humphreys" <cl*********@to ofgib.moc> wrote in message news:bm******** **@ucsnew1.ncl. ac.uk... When performing a large join, say on personaldetails against various other tables where there is a one to many relationship, obviously the first table will be repeated many times with the other's varying details. I only want one occurence of the other tables to be shown (so every personaldetails , but just any (random is ok) address/order/etc/).
...to be shown...? Where? On the screen you might use a form/subform whereas on paper you could use either a report/subreport or a single report with grouping. Any reason why you specifically wanted a query to do
this? Shown on screen, as a query. I just need the details of one table and a segment of their involvement in other tables.
Chris
Then unless there is a sensible reason not to, I would use a form/subform
combination. Not only is it easier to do in this case, but is so much more
flexible because of the form's additional properties and methods. There's
not much you can do with a query.
Fletcher This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: johnny |
last post by:
How do I join two string variables?
I want to do: download_dir + filename.
download_dir=r'c:/download/'
filename =r'log.txt'
I want to get something like this:
c:/download/log.txt
|
by: Andrew Sackville-West |
last post by:
Hi list,
I've tried, lots of interpreter testing and google grepping to figure
this out and I think I'm missing something fundamental.
I have an ascii data dump from a POS system that has 131 fields in a
single column in a flat file. I can easily open the file, read in the
data and assemble it into various formats. okay. what I *want* to do
is insert each of these fields into a mysql database that has 132
columns that correspond to...
|
by: J |
last post by:
Greetings Group-
I'm trying to put together a pattern matching script that scans a
directory tree for tif images contained in similar folder names, but
running into a NewB problem already. Is it the way I'm trying to join
multiple paths? Any help would be greatly appericated. Thanks, J!
import glob, sys, os
topdir = sys.argv
|
by: johnny |
last post by:
Scope of ids:
When I print "ids", it's always empty string '', as I have intialized
before. That's not what I want. I want the ids to have
str(r).join(',')
if res:
ids = ''
for r in res:
ids = str(r).join(',')
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |