Solved

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

  • 24 May 2023
  • 2 replies
  • 36 views

Badge

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

icon

Best answer by Garrett Bird 25 May 2023, 16:07

View original

2 replies

Userlevel 1
Badge

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.

Badge

It works!!!! Thanks a lot!

Reply