0

How do i get this column to execute, it has this exception 'Invalid name [SIS ID]? Meaning there is a space in between and want to find a way to allow it not to happened.

insert into dbo.eNtsaRegPeopleLists(LoginID,Name, [SIS ID],Section,Role,LastActivity,TotalActivity) 

values(1, 'gcobani', 'Ggcobs', 'Your course guide to template', 'Developer', '2020-09-22', 05.23);

// Error
Msg 207, Level 16, State 1, Line 2
Invalid column name 'SIS ID'.
2
  • 1
    Are you sure there is a column named: [SIS ID] in your table?
    – McNets
    Sep 22 '20 at 10:43
  • @McNets there was i fixed it and its working, thanks.
    – BraGcobs
    Sep 22 '20 at 13:44
0

I assume you mean how to get the INSERT statement to execute without error? (A column doesn't "execute".)

Apparently, there is no column named "SIS ID" in the dbo.eNtsaRegPeopleLists table. That is what the error message is telling you.

You did right by enclosing the column name in square brackets (double quotes is another option). So double-check what the column name really is. Perhaps the square brackets are part of the column name. Or that the space between SIS and ID isn't a space but some other invisible character (like char(255)). We can't say which it is, so it is for you to determine. One option is to do:

EXEC sp_help 'eNtsaRegPeopleLists'

And see what output you get for the column names.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.