# Perspective table binding in narrow mode

**URL:** <https://forum.inductiveautomation.com/t/perspective-table-binding-in-narrow-mode/59233>\
**Category:** Ignition\
**Created:** [May 5, 2022, 3:25am UTC](https://forum.inductiveautomation.com/t/perspective-table-binding-in-narrow-mode/59233 "2022-05-05T03:25:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ASF](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@ASF](https://forum.inductiveautomation.com/u/ASF)\
**Post date:** [May 5, 2022, 3:25am UTC](https://forum.inductiveautomation.com/t/perspective-table-binding-in-narrow-mode/59233/1 "2022-05-05T03:25:30Z")

</div>

I have a named query that returns a single row of batch data, e.g.:

```auto
ID: ABC123
Description: My Batch
WeightSP: 100
WeightPV: 101
Status: Complete

```

…and I would like to display it in a table, looking just like it does above. However, when I bind the table data to the query, it returns it in a wide format:

```auto
  ID Description WeightSP WeightPV Status
ABC123 My Batch 100 101 Complete

```

Is there any way to have the table display in narrow format without doing too much complex scripting which will break my ability to write the dataset back to the database with updated values?

---

<div class="post-metadata">

**Author:** ![stat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/stat/32/32530_2.png) [@stat](https://forum.inductiveautomation.com/u/stat)\
**Post date:** [May 5, 2022, 8:53pm UTC](https://forum.inductiveautomation.com/t/perspective-table-binding-in-narrow-mode/59233/2 "2022-05-05T20:53:51Z")

</div>

You could do some scripting to create a new dataset that’s in a narrow format. Then, that dataset can be used to display your data in the table, but that should not break your ability to write back to the database. Can you provide an example of how that would prevent you from writing back to the database?

---

<div class="post-metadata">

**Author:** ![josborn](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@josborn](https://forum.inductiveautomation.com/u/josborn)\
**Post date:** [May 5, 2022, 9:15pm UTC](https://forum.inductiveautomation.com/t/perspective-table-binding-in-narrow-mode/59233/3 "2022-05-05T21:15:57Z")

</div>

What database flavor are you using? If it is MSSQL then you can use [UNPIVOT](https://www.sqlservercurry.com/2011/01/unpivot-example-in-sql-server.html).

---

<div class="post-metadata">

**Author:** ![ASF](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@ASF](https://forum.inductiveautomation.com/u/ASF)\
**Post date:** [May 19, 2022, 10:49pm UTC](https://forum.inductiveautomation.com/t/perspective-table-binding-in-narrow-mode/59233/4 "2022-05-19T22:49:20Z")

</div>

Thanks, yes MSSQL and that’s just the trick I was looking for. Thanks!
