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

**URL:** <https://community.cdata.com/t/excel-add-in-for-zoho-books-how-to-select-all-billlineitems/197>\
**Category:** CData Drivers\
**Tags:** question, zoho\
**Created:** [May 24, 2023, 9:57pm UTC](https://community.cdata.com/t/excel-add-in-for-zoho-books-how-to-select-all-billlineitems/197 "2023-05-24T21:57:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marc](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@Marc](https://community.cdata.com/u/Marc)\
**Post date:** [May 24, 2023, 9:57pm UTC](https://community.cdata.com/t/excel-add-in-for-zoho-books-how-to-select-all-billlineitems/197/1 "2023-05-24T21:57:28Z")

</div>

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&nbsp;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

---

<div class="post-metadata">

**Author:** ![Garrett\_Bird](https://avatars.discourse-cdn.com/v4/letter/g/77aa72/32.png) [@Garrett\_Bird](https://community.cdata.com/u/Garrett_Bird)\
**Post date:** [May 25, 2023, 2:07pm UTC](https://community.cdata.com/t/excel-add-in-for-zoho-books-how-to-select-all-billlineitems/197/2 "2023-05-25T14:07:19Z")

</div>

If you are open to using SQL, then you may want to consider using WHERE&nbsp;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.

---

<div class="post-metadata">

**Author:** ![Marc](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@Marc](https://community.cdata.com/u/Marc)\
**Post date:** [May 25, 2023, 6:28pm UTC](https://community.cdata.com/t/excel-add-in-for-zoho-books-how-to-select-all-billlineitems/197/3 "2023-05-25T18:28:00Z")

</div>

It works!!! Thanks a lot!
