473,804 Members | 3,674 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Outer Join Dilema

Here is the problem.

I have two tables.

The first table from the Credit Card Vendor. I have grouped it by
date and it has three fields

Store
Date
AmexAmount


The second table is from the companys General Ledger and also has
three fields.

Store
Date
GLAmount


I want my query to look like...

Store Date AmexAmount GLAmount

I am trying to do a bank reconciliation.

Also, I create a relationship btw the Store and Date when I am
creating my query.

Any advice is GREATLY appreciated.

TIA

Jason
ja****@awdbt.co m
Nov 13 '05 #1
6 1334
Perhaps show us the SQL of your query ?
:)
--
regards,

Bradley
Jason wrote:
Here is the problem.

I have two tables.

The first table from the Credit Card Vendor. I have grouped it by
date and it has three fields

Store
Date
AmexAmount


The second table is from the companys General Ledger and also has
three fields.

Store
Date
GLAmount


I want my query to look like...

Store Date AmexAmount GLAmount

I am trying to do a bank reconciliation.

Also, I create a relationship btw the Store and Date when I am
creating my query.

Any advice is GREATLY appreciated.

TIA

Jason
ja****@awdbt.co m



Nov 13 '05 #2
On Fri, 28 May 2004 13:09:26 +1000, "Bradley"
<br*****@REMOVE THIScomcen.com. au> wrote:
Perhaps show us the SQL of your query ?
:)


I am not that advanced. I am using the query builder in access.

Thanks.
Nov 13 '05 #3
Jason wrote:
On Fri, 28 May 2004 13:09:26 +1000, "Bradley"
<br*****@REMOVE THIScomcen.com. au> wrote:
Perhaps show us the SQL of your query ?
:)


I am not that advanced. I am using the query builder in access.

Thanks.


hehe, just click on the SQL button to view the SQL of your query :)

--
regards,

Bradley
Nov 13 '05 #4
Jason <uc********@yah oo.com> wrote in message news:<3s******* *************** **********@4ax. com>...
Here is the problem.

I have two tables.

The first table from the Credit Card Vendor. I have grouped it by
date and it has three fields

Store
Date
AmexAmount


The second table is from the companys General Ledger and also has
three fields.

Store
Date
GLAmount


I want my query to look like...

Store Date AmexAmount GLAmount

I am trying to do a bank reconciliation.

Also, I create a relationship btw the Store and Date when I am
creating my query.

Any advice is GREATLY appreciated.

TIA

Jason
ja****@awdbt.co m


Try
SELECT Store, Date, AmexAmount, GLAmount FROM [Credit Card Vendor]
INNER JOIN [General Ledger] ON [Credit Card Vendor].Store = [General
Ledger].Store AND
[Credit Card Vendor].Date = [General Ledger].Date

HTH

Edward
Nov 13 '05 #5
On 28 May 2004 04:01:29 -0700, te********@hotm ail.com (Edward) wrote:
Jason <uc********@yah oo.com> wrote in message news:<3s******* *************** **********@4ax. com>...
Here is the problem.

I have two tables.

The first table from the Credit Card Vendor. I have grouped it by
date and it has three fields

Store
Date
AmexAmount

The second table is from the companys General Ledger and also has
three fields.

Store
Date
GLAmount

I want my query to look like...

Store Date AmexAmount GLAmount

I am trying to do a bank reconciliation.

Also, I create a relationship btw the Store and Date when I am
creating my query.

Any advice is GREATLY appreciated.

TIA

Jason
ja****@awdbt.co m


Try
SELECT Store, Date, AmexAmount, GLAmount FROM [Credit Card Vendor]
INNER JOIN [General Ledger] ON [Credit Card Vendor].Store = [General
Ledger].Store AND
[Credit Card Vendor].Date = [General Ledger].Date

HTH

Edward

Thanks. Does that give me all the records they have in common?

I think I need all the records from both to show up...

So one table may have $414.03 on 3/5/04 and the other table doesn't
have anything on 3/5/04, but has the $414.03 on 3/6/04 and vice versa.
So it's like I want two outerjoins.

TIA

Jason
Nov 13 '05 #6
Jason <uc********@yah oo.com> wrote in
news:25******** *************** *********@4ax.c om:
On 28 May 2004 04:01:29 -0700, te********@hotm ail.com (Edward)
wrote:
Jason <uc********@yah oo.com> wrote in message
news:<3s***** *************** ************@4a x.com>...
Here is the problem.

I have two tables.

The first table from the Credit Card Vendor. I have grouped
it by date and it has three fields

Store
Date
AmexAmount

The second table is from the companys General Ledger and
also has three fields.

Store
Date
GLAmount

I want my query to look like...

Store Date AmexAmount GLAmount

I am trying to do a bank reconciliation.

Also, I create a relationship btw the Store and Date when I
am creating my query.

Any advice is GREATLY appreciated.

TIA

Jason
ja****@awdbt.co m
Try
SELECT Store, Date, AmexAmount, GLAmount FROM [Credit Card
Vendor] INNER JOIN [General Ledger] ON [Credit Card
Vendor].Store = [General Ledger].Store AND
[Credit Card Vendor].Date = [General Ledger].Date

HTH

Edward

Thanks. Does that give me all the records they have in
common?

I think I need all the records from both to show up...

So one table may have $414.03 on 3/5/04 and the other table
doesn't have anything on 3/5/04, but has the $414.03 on 3/6/04
and vice versa. So it's like I want two outerjoins.

TIA

Jason


You are going to have to type a little bit of sql to get your
results.

Open the query builder.close the show tables dialog.
select sql view from the view dropdown on hte toolbar.

paste the following into the window.

SELECT store, date from [credit card vendor]
UNION
SELECT store, date from [General Ledger]

save the query with some name meaningful to you.
UnionExample is meaningful to me.

Now create a new query in the builder.
From the show tables dialog, select UnionExample, credic card
vendor, and general ledger.

drag relationship lines from unionExample.st ore and
UnionExample.Da te to the same fields in credit card vendor.
Double-Click on each of those two lines, and choose the option
which reads "show all records from UnionExample and ...."

Create the relationships between UnionExample and General Ledger,
just like you did with credit card vendor.

put the Store and date fields from UnionExample onto the grid,
and the other fields from the respective table.

save and run your results query.

Bob Quintal
..



Nov 13 '05 #7

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

Similar topics

2
18113
by: Martin | last post by:
I am now working on SQL Server 2000 having had previous experience on a different database. Both of the OUTER JOIN syntaxes is different from what I am used to and I am finding it slightly confusing. For example, given two tables : wipm_tbl_mi wipm_tbl_wi (which may not have data in it for a specific record that exists in the first table.)
8
4975
by: Matt | last post by:
Hello I have to tables ar and arb, ar holds articles and a swedish description, arb holds descriptions in other languages. I want to retreive all articles that match a criteria from ar and also display their corresponding entries in arb, but if there is NO entry in arb I still want it to show up as NULL or something, so that I can get the attention that there IS no language associated with that article.
4
4871
by: thilbert | last post by:
All, I have a perplexing problem that I hope someone can help me with. I have the following table struct: Permission ----------------- PermissionId Permission
3
10056
by: Dam | last post by:
Using SqlServer : Query 1 : SELECT def.lID as IdDefinition, TDC_AUneValeur.VALEURDERETOUR as ValeurDeRetour FROM serveur.Data_tblDEFINITIONTABLEDECODES def, serveur.Data_tblTABLEDECODEAUNEVALEUR TDC_AUneValeur where def.TYPEDETABLEDECODES = 4
3
19478
by: Martin | last post by:
Hello everybody, I have the following question. As a join clause on Oracle we use " table1.field1 = table2.field1 (+) " On SQL Server we use " table1.field1 *= table2.field1 " Does DB2 have the same type of operator, without using the OUTER JOIN syntax ?
3
7559
by: deko | last post by:
From what I understand, an Inner Join narrow the rows selected to the table with the least results... and an Outer Join does the opposite... SELECT qryTxToQ1.Q1Total, qryTxToQ2.Q2Total, qryTxToQ3.Q3Total, qryTxToQ4.Q4Total FROM qryTxToQ4 OUTER JOIN (qryTxToQ3 OUTER JOIN (qryTxToQ1 OUTER JOIN qryTxToQ2 ON qryTxToQ1.TxAcct_ID = qryTxToQ2.TxAcct_ID) ON qryTxToQ3.TxAcct_ID = qryTxToQ2.TxAcct_ID) ON qryTxToQ4.TxAcct_ID = qryTxToQ3.TxAcct_ID;
14
5725
by: mike | last post by:
I'm using postgresl 7.3.2 and have a query that executes very slowly. There are 2 tables: Item and LogEvent. ItemID (an int4) is the primary key of Item, and is also a field in LogEvent. Some ItemIDs in LogEvent do not correspond to ItemIDs in Item, and periodically we need to purge the non-matching ItemIDs from LogEvent. The query is: delete from LogEvent where EventType != 'i' and ItemID in
1
10436
by: Andreas Bauer | last post by:
Hi, when I try a left outer join on one table everything works fine: select * from (tourist.users u left outer join tourist.user_extended_info ue on (u.id = ue.id)) But now I need to do another left outer join with a third table, but this doesn't work (although I found a tutorial on sql where it was described that way):
5
3284
by: Eitan M | last post by:
Hello, How can I do outer join in ms-access database ? Thanks :)
0
9704
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
9572
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
10319
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
10303
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
9132
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...
0
6845
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();...
0
5639
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4282
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
3
2978
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.