Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2016
    Posts
    3

    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.

  2. #2
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,424
    Provided Answers: 8
    Look at UNION Query

    BUT the Trick is make shore the coloums data is the same and in the same place
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •