Monday, March 26, 2012

Problems with SQL 2005 IDE and Column Names

Hello all.

I'm having problems with SQL 2005 Management Studio not liking some of my column names, even though I believe they are valid when run directly through a SQL query window. An example...

CREATE TABLE [Test](
[ID] [int] NOT NULL,
[The.Name] [nvarchar](50) NULL )

INSERT INTO [Test] ( [ID], [The.Name]) VALUES (1, 'Test')

DELETE FROM [Test] WHERE [ID] = 1

This SQL will execute in the Query window without issue. To see the problem in action...

    Execute the SQL to CREATE the table and INSERT the row Use the Management Studio IDE to Right-Click on the Test table and "Open Table" Highlight the row in the new results window Try to delete the row See the error message: The multi-part identifier "The.Name" could not be bound

It's confusing me because, as far as I am able to determine, the column name is valid SQL and was even created in the IDE. Ultimately I can work around this by either working directly in SQL or simply renaming the column, but both options would be an impact on our project schedule. If anyone could provide some insight it would be greatly appreciated.

Much thanks.

Unfortunately it looks like you have uncovered a bug in Management Studio. I have filed it against the product team.|||

This bug is under consideration for being fixed in sql server 2005 SP2. You can track the bug at

http://lab.msdn.microsoft.com/ProductFeedback/viewFeedback.aspx?feedbackid=05843594-1bcf-4b5b-a51e-cfae51b27007

No comments:

Post a Comment