# SQL Database Connector: parameterizing a list

**URL:** <https://forum.bubble.io/t/sql-database-connector-parameterizing-a-list/188453>\
**Category:** APIs\
**Created:** [January 27, 2022, 5:39am UTC](https://forum.bubble.io/t/sql-database-connector-parameterizing-a-list/188453 "2022-01-27T05:39:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chaos.master](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@chaos.master](https://forum.bubble.io/u/chaos.master)\
**Post date:** [January 27, 2022, 5:39am UTC](https://forum.bubble.io/t/sql-database-connector-parameterizing-a-list/188453/1 "2022-01-27T05:39:35Z")

</div>

Hello,

I have successfully connected the bubble app to my external SQL server. Also, I could parameterize a single variable, as is shown below, and call and send the parameter from within the workflow.

 ![Screen Shot 2022-01-27 at 12.35.20 AM](https://us1.discourse-cdn.com/bubble/original/3X/0/2/0238a4eaaaaa5fb8c433dfd358c869cbb78d3385.png)

However, ideally, I would like to query the database for multiple ids instead of one id at a time. For example, I would like to do something like the below, which of course gives me an error. How can I parametrize and send a list of numbers instead of a single number at a time?

 ![Screen Shot 2022-01-27 at 12.35.58 AM](https://us1.discourse-cdn.com/bubble/original/3X/2/0/20c3dea82c0150e7c965da7c0419fe14e0c4b532.png)

Thank you so much for your help!

---

<div class="post-metadata">

**Author:** ![joeyg](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@joeyg](https://forum.bubble.io/u/joeyg)\
**Post date:** [January 27, 2022, 6:07pm UTC](https://forum.bubble.io/t/sql-database-connector-parameterizing-a-list/188453/2 "2022-01-27T18:07:11Z")

</div>

Here’s a thread that should help:

> [@SQL query with List parameter](http://forum.bubble.io/t/sql-query-with-list-parameter/147931):
>
> I am using the Bubble SQL API Plugin and have successfully done so for many queries. My current query has a list of numbers as one of the parameters. Select top 100 tbl1.AppointmentID, tbl1.ClientID, tbl2.AppType, tbl1.Date, tbl3.UserName as Bookedby, tbl4.UserName as Clinician, tbl5.LocName from Appointments tbl1 inner join AppTypes tbl2 on tbl1.Apptypeid = tbl2.AppTypeId inner join Users tbl3 on tbl1.CreatedByID=tbl3.UserId Inner join users tbl4 on tbl1.UserId=tbl4.UserID Inner join l…

For future SQL Database Connector questions, I’ve found searching the forum for “SQL” can return a lot of valuable information.

---

<div class="post-metadata">

**Author:** ![chaos.master](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@chaos.master](https://forum.bubble.io/u/chaos.master)\
**Post date:** [February 4, 2022, 6:53am UTC](https://forum.bubble.io/t/sql-database-connector-parameterizing-a-list/188453/3 "2022-02-04T06:53:30Z")

</div>

Thank you so much for pointing me to that thread. It solved half the problem. Now, I can send a list, and the call is successfully initialized too.

The remaining issue is how to get the results from DB. I was expecting to get an array with the same size as the input. But DB always returns back the result for the first id value, but nothing for the rest. Any idea how to proceed from here?

 ![Screen Shot 2022-02-04 at 1.49.03 AM](https://us1.discourse-cdn.com/bubble/original/3X/2/a/2a09f43f4a1f201be64a7b183b558bf9af67c93b.png)

For example, I am getting result for 11, but nothing for 434 or 324.

Any idea would be appreciated.

---

<div class="post-metadata">

**Author:** ![joeyg](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@joeyg](https://forum.bubble.io/u/joeyg)\
**Post date:** [February 4, 2022, 11:43pm UTC](https://forum.bubble.io/t/sql-database-connector-parameterizing-a-list/188453/4 "2022-02-04T23:43:59Z")

</div>

Use your API call as the data source of a repeating group. All 3 rows should return.
