JDBC Driver for Zoho Books

Build 24.0.9060

JOIN Queries

The CData JDBC Driver for Zoho Books supports standard SQL joins like the following examples:

Inner Join

An inner join selects only rows from both tables that match the join condition:

Joining ChartOfAccounts with BankTransactions

 SELECT ChartOfAccounts.ChartAccountId, Banktransactions.AccountId, TransactionId, ChartOfAccounts.AccountName, Banktransactions.AccountName, ChartOfAccounts.AccountType, Banktransactions.AccountType FROM ChartOfAccounts INNER JOIN banktransactions ON banktransactions.AccountId = ChartOfAccounts.ChartAccountId 
Joining ChartOfAccounts with ReportsAccountTransactionsDetails
 SELECT * FROM ChartOfAccounts INNER JOIN ReportsAccountTransactionsDetails ON ReportsAccountTransactionsDetails.AccountId = ChartOfAccounts.ChartAccountId WHERE FromDate = '2022-09-01' and ToDate = '2022-11-16' and ChartAccountId = 3519201000000000370 
Joining ChartOfAccounts with BankAccounts
 SELECT * FROM ChartOfAccounts INNER JOIN BankAccounts ON BankAccounts.AccountId = ChartOfAccounts.ChartAccountId 
Left Join

A left join selects all rows in the FROM table and only matching rows in the JOIN table:

 SELECT ChartOfAccounts.ChartAccountId, Banktransactions.AccountId, TransactionId, ChartOfAccounts.AccountName FROM ChartOfAccounts LEFT OUTER JOIN BankTransactions ON banktransactions.AccountId = ChartOfAccounts.ChartAccountId 

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060