Skip to main content
Solved

Excel add-in for Zoho Books: How to select all “BillLineItems”

  • May 24, 2023
  • 2 replies
  • 54 views

Forum|alt.badge.img

Hi!

I’m using the Excel add-in to connect to Zoho Books. I would like to get all “BillLineItems” from Zoho. The BillLineItems is a standard view or table.

It is not possible to use the SELECT * command in order to retrieve all lineitems. It is required to a specify a BillID (key) number in order to get the data for that specific bill from this table (as I understand).

Maybe it is my lack of knowledge of SQL. Do you have any suggestions how to get all BillLineitems?

 

Thanks in advanve for your response.

Regards,

Marc

Best answer by Garrett Bird

If you are open to using SQL, then you may want to consider using WHERE criteria with the IN operator. The other operand would take a list of BillId values from a nested sub-select to a different table (namely Bills). The query below should demonstrate what I mean:

 

SELECT * FROM BillLineItems WHERE BillId IN (SELECT BillId FROM Bills)

 

The query above will first obtain a list of BillId values from the Bills view, and automatically feed them one by one into the query for BillLineItems.

This topic has been closed for replies.

2 replies

Forum|alt.badge.img
  • Employee
  • Answer
  • May 25, 2023

If you are open to using SQL, then you may want to consider using WHERE criteria with the IN operator. The other operand would take a list of BillId values from a nested sub-select to a different table (namely Bills). The query below should demonstrate what I mean:

 

SELECT * FROM BillLineItems WHERE BillId IN (SELECT BillId FROM Bills)

 

The query above will first obtain a list of BillId values from the Bills view, and automatically feed them one by one into the query for BillLineItems.


Forum|alt.badge.img
  • Author
  • Apprentice
  • May 25, 2023

It works!!!! Thanks a lot!