Thread: Combining three tables into one.
08-12-16, 14:20 #1Registered User
- Join Date
- Mar 2016
Unanswered: Combining three tables into one.
I need to do a select on three tables, then in the resulting view have the fields from each select. The three tables are :
Accounts Payable, Accounts Receivable, General Ledger
The fields I want are :
ID, Paid, PaidDate, source, or some variation from each table.
The resulting view would be something like:
T1F1, T1F2, T1F3, T1F4, T2F1, T2F2, T2F3, T2F4, T3F1, T3F2, T3F3, T3F4
There T is the table, and F is the selected field.
Is there a way to do with against Postgresql? I looked at JOIN, but there are no links between the three tables. Each table has a some of the transaction against a GL account. What I need is a printout that contains the transactions from all three tables in date order. The actual problem is one table is deposits to the bank, one is cheques written, the other is service fees etc. That I need to print out is sort of a bank statement in date order including deposits, withdraws and misc.
08-14-16, 22:58 #2(Making Your Life Easy)
Provided Answers: 10
- Join Date
- Feb 2004
- New Zealand
Look at UNION Query
BUT the Trick is make shore the coloums data is the same and in the same placehope this help
the aim is store once, not store multiple times
Remember... Optimize 'til you die!
Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
VB-NET based on my own environment started 2007
SQL-2005 based on my own environment started 2008
YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.
DONT WORRY ABOUT THOSE WHO TALK BEHIND YOUR BACK
THEY'RE BEHIND YOU FOR A REASON