# Block Transaction Group: non-numeric custom index column

**URL:** <https://forum.inductiveautomation.com/t/block-transaction-group-non-numeric-custom-index-column/32786>\
**Category:** Ignition\
**Tags:** ignition80, database\
**Created:** [March 3, 2020, 9:31pm UTC](https://forum.inductiveautomation.com/t/block-transaction-group-non-numeric-custom-index-column/32786 "2020-03-03T21:31:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmunin](https://avatars.discourse-cdn.com/v4/letter/m/c0e974/32.png) [@mmunin](https://forum.inductiveautomation.com/u/mmunin)\
**Post date:** [March 3, 2020, 9:31pm UTC](https://forum.inductiveautomation.com/t/block-transaction-group-non-numeric-custom-index-column/32786/1 "2020-03-03T21:31:40Z")

</div>

I need to use a Block Transaction Group to pull information on multiple tanks from a database table into their corresponding Ignition tags.

In the block view, the items are in alphabetical order based on the tank’s name. The tanks are named “H100,” “H101,” etc.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/b/b49611d88a6d32d34f3da26c9ae9dc580bd29bb4.png)

In order to ensure that my SELECT query pulls in the rows sorted by name, i must make “name” as the custom index column. However, Ignition is not happy when this custom index is non-numeric. I get an error that “H100” cannot be cast as a BIGINT.

I can make my custom index the primary key in my table, but then the sorting is incorrect: Ignition will return rows sorted by the primary key, causing a mismatch between the tanks. Tank H100 will receive H107’s data, because H107 has a lower primary key value.

Is there a way that I can: convince Ignition that having a custom index that is alphanumeric is acceptable OR sort my SELECT query based on a column other than the custom index?

---

<div class="post-metadata">

**Author:** ![mmunin](https://avatars.discourse-cdn.com/v4/letter/m/c0e974/32.png) [@mmunin](https://forum.inductiveautomation.com/u/mmunin)\
**Post date:** [March 3, 2020, 10:13pm UTC](https://forum.inductiveautomation.com/t/block-transaction-group-non-numeric-custom-index-column/32786/2 "2020-03-03T22:13:14Z")

</div>

So far my only workaround is to use the “--” SQL inline comment. So my WHERE clause in my block group reads (sloc is what we use for the tank name):

```auto
sLoc = '{[~]Tanks/Bay 9/Tank H100/sLoc}' OR
sLoc = '{[~]Tanks/Bay 9/Tank H101/sLoc}' OR
sLoc = '{[~]Tanks/Bay 9/Tank H102/sLoc}' OR
sLoc = '{[~]Tanks/Bay 9/Tank H103/sLoc}' OR
sLoc = '{[~]Tanks/Bay 9/Tank H104/sLoc}' OR
sLoc = '{[~]Tanks/Bay 9/Tank H105/sLoc}' OR
sLoc = '{[~]Tanks/Bay 9/Tank H106/sLoc}' OR
sLoc = '{[~]Tanks/Bay 9/Tank H107/sLoc}' OR
sLoc = '{[~]Tanks/Bay 9/Tank H108/sLoc}' OR
sLoc = '{[~]Tanks/Bay 9/Tank H109/sLoc}'
ORDER BY "sLoc" ASC --

```
