Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Jaykappy
Starting Member
19 Posts |
Posted - 2011-01-20 : 10:00:02
|
| I am trying to add a column to an existing table. I am very very new to this and of course this is a trivial question...Note I am doing this right from Microsoft SQL Server Management StudioI am using the below statement: ALTER TABLE [dbo].[Fire_Responsible Person] ADD BOEmail VARCHAR(75) GOI execute the QueryBUT for some reason when I right click the table (after running the query) and choosing "Select top 100 rows"....it has a red squigly line under the New Column Name....when I hover over it it says that "Invalid Column Name BOEMail"Any ideas whats going on?THanks |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2011-01-20 : 10:13:07
|
| Try refreshing the table(s) in management studio.Another option is to write the query yourself rather than clicking.==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
Jaykappy
Starting Member
19 Posts |
Posted - 2011-01-20 : 10:51:20
|
| Thanks....I ran the query again (after deleting the column), right clicked the table and hit refresh. Right click the table again and displayed top 1000 rows....Same thing...Red Squigly line saying invalid Column name....'BOEMail' |
 |
|
|
Jaykappy
Starting Member
19 Posts |
Posted - 2011-01-20 : 10:54:38
|
| Think I figured it out....hard to believe...thought this was a stable product....I had to completly close the Management Studio and reopen it...the error was gone...Is this normal practice for this software? Seems a little glitchy |
 |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2011-01-20 : 11:00:46
|
| I think it generates the select statement from the table structure that it has loaded. That is not matching the actual structure so I would guess it is a refresh issue.When you look at the columns in management studio what do you see?Try refreshing all tables.Try disconnecting and reconnecting.I never use this so haven't come across it before. WHat happens if you type in select top 100 * from tbl ==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|