cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resident Rockstar
Resident Rockstar

SQL Primary key - invalud coumn name???

Always some stupid detail...

 

Very easy to do... but, why do I get an error on the column name being invalid?  It isnt.  

 

image.png

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Resident Rockstar
Resident Rockstar

Re: SQL Primary key - invalud coumn name???

Huh... i renamed it a couple of times, same result... Design looks fine, no errors...

 

BUT... I exited studio, and opened it again... it was fine after that.  Strange.

View solution in original post

Highlighted
Super User III
Super User III

Re: SQL Primary key - invalud coumn name???

Just for info, the red squiggly lines often appear in SSMS when you rename/add objects and the Intellisense becomes out of sync.

Rather than close/reopen SSMS, a quicker way is to use the shortcut <Ctrl><Shift><R>, or to select the Refresh Local Cache option in the Edit > IntelliSense menu.

 

image.png

View solution in original post

9 REPLIES 9
Highlighted
Super User
Super User

Re: SQL Primary key - invalud coumn name???

That is interesting, considering that SSMS generated the query! You would think it would know the column names.

 

If you look at the Design (just above the Select Top 1000 Rows when you right click on the table), does that have the same column name or any errors?

Highlighted
Resident Rockstar
Resident Rockstar

Re: SQL Primary key - invalud coumn name???

Huh... i renamed it a couple of times, same result... Design looks fine, no errors...

 

BUT... I exited studio, and opened it again... it was fine after that.  Strange.

View solution in original post

Highlighted
Super User
Super User

Re: SQL Primary key - invalud coumn name???

Glad you were able to solve the issue! I have noticed some occasional refresh issues in SSMS. Hitting F5 a few times for good measure never hurts. Smiley Very Happy

Highlighted
Resident Rockstar
Resident Rockstar

Re: SQL Primary key - invalud coumn name???

Yes, I did several F5s at many levels.  The only thing that resolved was an exit, @wyotim .  I did it a second time, and same thing.

Highlighted
Super User
Super User

Re: SQL Primary key - invalud coumn name???

That is a bit of a bummer to hear! Good to know though. Thanks for sharing your experience. I know it will help me and anyone else who finds this thread in the future! 

Highlighted
Resident Rockstar
Resident Rockstar

Re: SQL Primary key - invalud coumn name???

The table actually executes just fine, despite the red squiggly, and such.  There was no other apparent issue.

Highlighted
Super User III
Super User III

Re: SQL Primary key - invalud coumn name???

Just for info, the red squiggly lines often appear in SSMS when you rename/add objects and the Intellisense becomes out of sync.

Rather than close/reopen SSMS, a quicker way is to use the shortcut <Ctrl><Shift><R>, or to select the Refresh Local Cache option in the Edit > IntelliSense menu.

 

image.png

View solution in original post

Highlighted
Super User
Super User

Re: SQL Primary key - invalud coumn name???

Thanks for the info @timl! That makes total sense. You rock!

Highlighted
Super User III
Super User III

Re: SQL Primary key - invalud coumn name???

Hehe, thanks @wyotim! You rock too!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,651)