# Connecting to MSSQL server with a linked server

**URL:** <https://forum.inductiveautomation.com/t/connecting-to-mssql-server-with-a-linked-server/96422>\
**Category:** General Discussion\
**Tags:** database\
**Created:** [September 25, 2024, 2:11pm UTC](https://forum.inductiveautomation.com/t/connecting-to-mssql-server-with-a-linked-server/96422 "2024-09-25T14:11:02Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [September 26, 2024, 12:28pm UTC](https://forum.inductiveautomation.com/t/connecting-to-mssql-server-with-a-linked-server/96422/6 "2024-09-26T12:28:03Z")

</div>

> [@Can query SQL tables, but cannot query SQL views, GatewayException: Unknown SQL type: -156](https://forum.inductiveautomation.com/t/can-query-sql-tables-but-cannot-query-sql-views-gatewayexception-unknown-sql-type-156/43877):
>
> GatewayException: Unknown SQL type: -156 caused by SQLException: Unknown SQL type: -156 Ignition v8.0.16 (b2020082513) Java: Azul Systems, Inc. 11.0.7 Other information:SQL version: 13.0.4001.0

Instead of doing a `SELECT *` list your columns and CAST the problematic column.

---

_[View the full topic](https://forum.inductiveautomation.com/t/connecting-to-mssql-server-with-a-linked-server/96422)._
