---
title: "Why does gateway-sql not return column data?"
description: "Gateway SQL requires unique column names and does not include source table prefixes automatically. Using aliases to create unique column names resolves issues with missing column data in query results."
url: "https://docs.itrsgroup.com/docs/faq/geneos/115004028429-geneos-why-does-gateway-sql-not-return-column-data/index.html"
---
One of the possibilities is you are joining tables which contain same column names.

Gateway SQL must have unique column names - the source table prefix is NOT included.  This will work:  select Table\_A.name as name, Table\_A.status as Table\_A\_status, Table\_B.status as Table\_B\_status from Table\_A left join Table\_B on Table\_A.name = Table\_B.name  But **NOT** this:  select Table\_A.name, Table\_A.status, Table\_B.status from Table\_A left join Table\_B on Table\_A.name = Table\_B.name


