Using SQL Server. I am getting an error from an SQL Insert statement:
The name "InvalidAwps" is not permitted in this context. Valid
expressions are constants, constant expressions, and (in some contexts)
variables. Column names are not permitted.
This is the Insert SQL that produces that error:
Insert Into [PlanFinder].[ReportLinks]
(TypeOfReport, Links) Values (InvalidAwps, \\uafc.com\ReportLinks\InvalidAwps);
And here is the table definition:
Create Table [PlanFinder].[ReportLinks]
(
[TypeOfReport] Char (11) Not Null,
[Links] Money Null,
Constraint pk_TypeOfReport Primary Key Clustered (TypeOfReport)
)
How do I fix this?
You need string delimiters
However, then you’ll get errors inserting the string
\\uafc.com\ReportLinks\InvalidAwpsinto amoneycolumn…or are
\\\InvalidAwps,\\\Missingmeant to be symbols of some kind?