473,657 Members | 2,358 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Displaying all comapany branches

Hi there,

I'm trying to create a query that will display all branches in a company
even if that branch hasn't made a claim. The main manufacturing company
makes the machines and distributes the machines to the other branches and it
is up to each branch to sell the machines to the customers. It is also the
branches responsibility to make sure the machine is registered when sold and
to deal with any warranty claims. The branch then sends all registration
details and warranty claims back to the manufacture where the manufacture
processes them.

On a monthly basis the manufacture creates reports and send them back to the
branch notifying them of the status of each claim submitted: credited, on
hold or declined. I've created this report in 2 ways, one as a standard
Access report and the other in Excel. It's the one created in Excel that
they use because it can be emailed easily and each branch manager can sort
the information to their own liking.

Not every branch sends in warranty claims but the manufacture wants the
reports to display all the branches even if they haven't made a claim, at
the moment they only display the branches that have made claims.

*tblBranch*
BranchID (PK) Autonumber
Branch

*tblMachines*
MachineID (PK) Autonumber
S/N
etc

*tblRegistratio nDetails*
RegID (PK) Autonumber
MachineID (FK) one to one from tblMachines
BranchID (FK) one branch can register many machines
etc

*tblWarrantyCla ims*
WarrID (PK) Autonumber
RegID (FK) one registration can have many claims
ClaimNo
ClaimDate
Status (FK) from tblstatus
etc

The overall table structure is a bit more complicated than this but how can
I display all branches in the reports even if the branch hasn't made a
claim? Report must show S/N, ClaimNo, Branch, ClaimDate, Status plus a few
more items from a WarrantyDetails table.

TIA
Stewart

Nov 12 '05 #1
3 1573
Stewart,

It appears like you need to use a left or right outer join in your report
query. If you use a left outer join, the query will display all records in
the left table, even those without any related records in the right
table(s).

Best regards,

Todd

"Stewart Allen" <sa****@ThisPar tNotVailid.wave .co.nz> wrote in message
news:bq******** **@news.wave.co .nz...
Hi there,

I'm trying to create a query that will display all branches in a company
even if that branch hasn't made a claim. The main manufacturing company
makes the machines and distributes the machines to the other branches and it
is up to each branch to sell the machines to the customers. It is also the
branches responsibility to make sure the machine is registered when sold and
to deal with any warranty claims. The branch then sends all registration
details and warranty claims back to the manufacture where the manufacture
processes them.

On a monthly basis the manufacture creates reports and send them back to the
branch notifying them of the status of each claim submitted: credited, on
hold or declined. I've created this report in 2 ways, one as a standard
Access report and the other in Excel. It's the one created in Excel that
they use because it can be emailed easily and each branch manager can sort
the information to their own liking.

Not every branch sends in warranty claims but the manufacture wants the
reports to display all the branches even if they haven't made a claim, at
the moment they only display the branches that have made claims.

*tblBranch*
BranchID (PK) Autonumber
Branch

*tblMachines*
MachineID (PK) Autonumber
S/N
etc

*tblRegistratio nDetails*
RegID (PK) Autonumber
MachineID (FK) one to one from tblMachines
BranchID (FK) one branch can register many machines
etc

*tblWarrantyCla ims*
WarrID (PK) Autonumber
RegID (FK) one registration can have many claims
ClaimNo
ClaimDate
Status (FK) from tblstatus
etc

The overall table structure is a bit more complicated than this but how can
I display all branches in the reports even if the branch hasn't made a
claim? Report must show S/N, ClaimNo, Branch, ClaimDate, Status plus a few
more items from a WarrantyDetails table.

TIA
Stewart


Nov 12 '05 #2
Thanks Todd but it did not work, get ambiguous joins error message for both
the left outer and right outer joins. I tried all possible combinations of
right and left with all the tables.

Just a little correction to the table structure I'd posted it should be:
*tblBranch*
BranchID (PK) Autonumber
Branch

*tblMachines*
MachineID (PK) Autonumber
BranchID (FK) one branch can have many machines
S/N
etc

*tblRegistratio nDetails*
RegID (PK) Autonumber
MachineID (FK) one to one from tblMachines
etc

*tblWarrantyCla ims*
WarrID (PK) Autonumber
RegID (FK) one registration can have many claims
ClaimNo
ClaimDate
Status (FK) from tblstatus
etc

The change is the tblMachines has the BranchID so the manufacture can trace
who has been sent the machine even the machine hasn't been sold to a
customer. In me previous post I had the BranchID in the
tblRegistration Details.

Although my client has said he'd like all the branches to appear in the
reports but it won't be the end of the world if it doesn't happen. Situation
required; One branch can send in many warranty claims per month and each
warranty claim can only belong to one branch but not every branch sends in
claims every month. The reports are filtered via the claim date field to
find only the claims for that month. There is another table,
tblWarrantyDeta ils (parts, quantity, cost), as well but I can add that later
once I can get this part working first.

Does anybody have any other sugestions here?

Stewart
"Todd Shillam" <ts******@hotma il.com> wrote in message
news:xM******** ************@ce nturytel.net...
Stewart,

It appears like you need to use a left or right outer join in your report
query. If you use a left outer join, the query will display all records in the left table, even those without any related records in the right
table(s).

Best regards,

Todd


Nov 12 '05 #3
Sounds like you're trying to use two outer joins in the same query in
some way that the query interpreter doesn't like. You could probably
do this if you break this into separate queries.

Something like:
(1) find all the Warranty Claims for each Branch (Showing all
Branches, regardless of whether they have claims)

SELECT ...
FROM tblBranch LEFT JOIN tblRegistration Details AS RD ON
tblBranch.Branc hID = RD.BranchID...

And then use that query in the second query and you should be good to
go. You can't do something like

TableA---LeftJoin---TableB--RightJoin---TableC

that's like a full outer join, which Oracle can do, but Access can't.
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2205
by: Piet | last post by:
Hi there. I have a problem when working with a wxTreeCtrl. I would like to expand all branches of a sepcific position in a tree with a single command. Since there does not appear to be such a command, I tried to write my own recursive function. Here is the code snippet: def OnPopup1(self,event): item = self.Tree.GetSelection() self.parent.msgbox(self,self.Tree.GetItemText(item),"Kein Titel",wxOK) #self.Tree.Expand(item)
1
508
by: Dave Posh | last post by:
I seem to be having a problem displaying time stored in mysql. The format stored in the database is 13:15:05. The database data type is time. I'm using asp vbscript and sql to retrieve the time store in the database. However asp recognizes the data type as date and displays the date instead of the time. If I change the data type in mysql to varchar then asp will display the time correctly, but I cannot do it this way. I want to be able...
2
3439
by: Carole MacDonald | last post by:
There have been lots of posts on this topic, but I haven't been able to apply any of the suggestions to my situation. I have an .aspx page with a form on it that has several submit buttons on it. Clicking a button will cause a web service action that returns XML. I would like to display this XML response on the page with the form. I know I can display XML in an IFRAME by pointing its source to an XML file. But I'm streaming the XML...
5
2216
by: Robert | last post by:
Hello Accessors I have some reports created in Access that are very good for what they do. However, it seems to me that when you are displaying information you don't need to print out that a printer-friendly report is not the best way to go. So, I tried converting one of my Access reports to an Access form. I selected the continuous view to allow displaying multple records but when I went to define my sorting and grouping there was none...
2
4332
by: RAJ | last post by:
In our multi-tier application, we have several ASP.NET user controls which will update the same data source provided by middle tier logic. In this particular scenario we have one user control displaying the contents of the data source, whilst another control updates the datasource via a command buttons implementation of 'Click', an event raised in the 'Handle Postback Events' stage of the control execution life cycle (via the...
3
1676
by: Alwin | last post by:
Hey All! I am currently designing a database model for (at first sight) a simple order entry program. The problem I'm currently facing is the exchange of data between the databases of each branch of the company. The company consists of five branches where each the same program and, hence, same database is installed. The data between these branches have to be exchanged (i.e. customers, users). Now my question is, how should I design the...
0
1001
by: Nick 'The Database Guy' | last post by:
Despite the windy weather my driveway is still relatively unobstructed with folliage, so you might ask what is my problem. I am using the tree view active X control and was wondering the correct syntax to remove branches. Thanks In Advance. Nick
2
1778
by: shar7 | last post by:
Hi, I am new to SQL and I need help to display null value as 0. Problem description: The query is to display Branch Code, Branch Location, Account Type Code, account Type Description and Total Current Values of each type of account. The report also needs to show a total of zero if the account type is not currently in use at that branch - ie. all branches should have two entries, one for Savings and one for Term Deposits. My code works...
6
5155
by: Jeff Newman | last post by:
Hello, Could anyone explain to me why the following class's destructor shows up as having multiple branches? (At least as judged by gcov 4.1.2 when compiled with gcc 4.1.2 ): struct blah { blah(); virtual ~blah();
0
8411
marktang
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...
0
8323
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8739
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8513
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,...
0
8613
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7351
agi2029
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...
1
6176
isladogs
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...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.