Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have two tables.
This is table 1.
| Account Number | Text | Starting Balance | Year |
| 1 | "Ending Balance" | $500 | 2020 |
| 2 | "Ending Balance" | $200 | 2020 |
| 3 | "Ending Balance" | $550 | 2020 |
This is table 2. This table has a lot of accounts but I only want the accounts that are in Table 1.
| Account | Text | Current Balance | Date |
1 | title A | $50 | 01/01/2021 |
| 1 | title B | $20 | 02/11/2021 |
| 1 | title C | $15 | 02/14/2021 |
| 2 | title B | $10 | 01/15/2021 |
| 2 | title D | $20 | 04/15/2021 |
| 3 | title A | $25 | 05/13/2021 |
| 3 | title M | $12 | 01/03/2021 |
| 3 | title N | $110 | 01/22/2021 |
This is what I want.
| Account | Text | Starting Balance | Current Balance | |
| 1 | "Ending Balance" | |||
| 1 | title A | |||
| 1 | title B | |||
| 1 | title C | |||
| 2 | "Ending Balance" | |||
| 2 | title B | |||
| 2 | title D | |||
| 3 | "Ending Balance" | |||
| 3 | title A | |||
| 3 | title M | |||
| 3 | title N |
I am having trouble joining them when I have two columns with the same name.
Is there a way to join two tables like this or my logic simply wrong?
Hi,
You can concatenate these two tables to get all Account and Text values into one single column.
Thanks,
Ashutosh
Hi,
You can concatenate these two tables to get all Account and Text values into one single column.
Thanks,
Ashutosh
Thank you. Actually, the post needed a bit more information.
The second table has a lot of accounts but I only need the info about account in Table 1.
I just used WHERE to restrict the account. 😄