Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

Help with Invalid Column Name error in SQL

$
0
0

This is a commercial database, not a home-built one.

There is a Stock Items table that references another table "STKLabelPrintingOptionType" containing Label Print Options - this latter table contains two columns, an ID and Name.

In Management Studio, if I select the StockItem table to a query it clearly shows the column "STKLabelPrintingOptionName" but it also is underlined indicating that the column name is invalid. All queries referencing the "Name" column run but the column in the results is NULL

Here's the entry in the StockItems table showing the error underline:

and here's the referenced table:

showing the "Name" column.

Why is the "Name" column invalid?

How do I validate it so that the data shows in queries referencing it?



Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>