How To Resolve This “Invalid Column Name” Error?

208    Asked by Aashishchaursiya in SQL Server , Asked on Aug 4, 2023

 I am attempting to run an UPDATE query like the one given below:

UPDATE [TILL].[dbo].[appParameters] SET [TILL].[dbo].[appParameters].[ParameterValue

When the field [parameter name] refers to the value “StaffTablesRefresged”, then create the value of [parameterValue] to 1. On executing, SQL server gives the error as invalid column name “stafftablesrefreshed”. [parametername] and [parametervalue] are nvarcgar 255/ Is there something being unnoticed?

Answered by Elizabeth Clarke

This error can be fixed by substituting the double quotes with single ones. SQL server takes double quotes as a delimiter for identifiers, and this occurs for the query here. Strings are stated in single quotes. Considering number 1, you need to erase the double quotes. There is a configuration to a;ter how SQL server manages double quotes: SET QUOTED_IDENTIFIER, however you utilize the default configuration, implying you stick to the above-mentioned suggestions.

The SQL Server Online Training offered at JanBask Training gives an experience like offline classes and prepares the students by covering the core concepts in MS SQL server certification making them ready to face the competitive job market. The students are also saved from the burden of traveling to physical locations to take classes.JanBask Training also aims to teach the wise methods of how the databases are generated and controlled in the business.



Your Answer

Interviews

Parent Categories