# Query Error: GatewayException: Unknown SQL type: 2003 	caused by SQLException: Unknown SQL type: 2003

**URL:** <https://forum.inductiveautomation.com/t/query-error-gatewayexception-unknown-sql-type-2003-caused-by-sqlexception-unknown-sql-type-2003/86308>\
**Category:** Ignition\
**Tags:** ignition81, scripting\
**Created:** [February 24, 2024, 1:33pm UTC](https://forum.inductiveautomation.com/t/query-error-gatewayexception-unknown-sql-type-2003-caused-by-sqlexception-unknown-sql-type-2003/86308 "2024-02-24T13:33:55Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 24, 2024, 3:35pm UTC](https://forum.inductiveautomation.com/t/query-error-gatewayexception-unknown-sql-type-2003-caused-by-sqlexception-unknown-sql-type-2003/86308/2 "2024-02-24T15:35:12Z")

</div>

You are trying to retrieve a column or expression result from SQL that yields an array data type. Those don't map to vanilla JDBC, so you can't pull them into Ignition (as arrays). Change your SQL expressions to perform the complete array operation in SQL and return an ordinary data type.

As it happens, Ignition's "Prep" queries hand off argument processing to the actual JDBC driver, so it is possible to **send** arrays to Postgres. See this if you are interested:

> [@Taking a Dataset and Inserting it to a SQL temp table](https://forum.inductiveautomation.com/t/taking-a-dataset-and-inserting-it-to-a-sql-temp-table/83852/4):
>
> If you were using a competent database (the following is PostgreSQL), you can pass java arrays as arguments, and unnest() them in a FROM clause. For an example, I created a table in my psql forum playground called phrases, to be used in a join. When queried by itself, you get this dataset: "#NAMES" "prefix","suffix" "#TYPES" "str","I" "#ROWS","4" "Hello","1" "Good Bye","2" "Welcome to","3" "Whoa!","4" To go with that, in a custom property named lookups, I created the following unbound datase…

---

_[View the full topic](https://forum.inductiveautomation.com/t/query-error-gatewayexception-unknown-sql-type-2003-caused-by-sqlexception-unknown-sql-type-2003/86308)._
