# Access one column of dataset returned by Stored Procedure in Perspective

**URL:** <https://forum.inductiveautomation.com/t/access-one-column-of-dataset-returned-by-stored-procedure-in-perspective/40058>\
**Category:** Ignition\
**Tags:** ignition80, database, perspective\
**Created:** [October 27, 2020, 4:51pm UTC](https://forum.inductiveautomation.com/t/access-one-column-of-dataset-returned-by-stored-procedure-in-perspective/40058 "2020-10-27T16:51:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JWStaggs78](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@JWStaggs78](https://forum.inductiveautomation.com/u/JWStaggs78)\
**Post date:** [October 27, 2020, 4:51pm UTC](https://forum.inductiveautomation.com/t/access-one-column-of-dataset-returned-by-stored-procedure-in-perspective/40058/1 "2020-10-27T16:51:14Z")

</div>

My database admin, supplies some data via stored procedure which returns one row with 6 columns. I would like to bind to that and use 1 of those columns as a data point in a chart. I have a Named Query that takes the stored procedure parameters (beginDate,endDate) and returns the dataset correctly. However, I do not know how to select just one column from the 6 that are returned in that single row. Is this possible? It will always return just one row with 6 columns.

We tried allowing it to return as JSON. This shows up the props data showing all 6 values, but still don’t know how to say, “Hey, just use this one as my value.”

Any help appreciated. TIA

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 27, 2020, 5:37pm UTC](https://forum.inductiveautomation.com/t/access-one-column-of-dataset-returned-by-stored-procedure-in-perspective/40058/2 "2020-10-27T17:37:54Z")

</div>

You can make your named query a scalar query - that would require that the row to return is the _first_ column in the result set. Otherwise, you can add an expression transform (put the return type back to dataset) and just use `{value}[0, "columnName"]` as the expression.

---

<div class="post-metadata">

**Author:** ![JWStaggs78](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@JWStaggs78](https://forum.inductiveautomation.com/u/JWStaggs78)\
**Post date:** [October 27, 2020, 7:44pm UTC](https://forum.inductiveautomation.com/t/access-one-column-of-dataset-returned-by-stored-procedure-in-perspective/40058/3 "2020-10-27T19:44:15Z")

</div>

> [@paul-griffith](#):
>
> `{va`

Thanks a million! Just could not figure it out.
