February 18, 2010 at 1:35 pm
I'm upsizing an Access file to SQLServer. In the process of shaking down the front end, I've run across a column name that SQLServer doesn't like.
The following SQL generated from the right click menu, results in an intellisense error 'Invalid Column Name' for UserProfileShortName
/****** Script for SelectTopNRows command from SSMS ******/
SELECT TOP 1000 [Id]
,[UserProfileShortName]
,[MenuFunctionShortName]
FROM [TrailerManagement].[dbo].[UserProfileDetails]
I copied the drop/create for reference only
USE [TrailerManagement]
GO
/****** Object: Table [dbo].[UserProfileDetails] Script Date: 02/18/2010 15:30:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UserProfileDetails](
[Id] [int] NOT NULL,
[UserProfileShortName] [nvarchar](50) NULL,
[MenuFunctionShortName] [nvarchar](50) NULL
) ON [PRIMARY]
GO
February 18, 2010 at 1:45 pm
I'm not getting that error.
February 18, 2010 at 1:51 pm
I did not get the error either and I have converted a lot of Access Databases to SQL Server.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
February 18, 2010 at 2:09 pm
Something else to blame the recession on. The project was ready to start its shakedown and then yanked with a cease & decease email. Its now being revisited on a much smaller scale allowing me the opportunity to upsize it now given some very long-range goals. I imported all of the tables, so I'm guessing that might be the source of the problem. Once I've got the front end shaken down, I'll probably go in and drop and recreate them all just to tidy things up. I would do that now, but I want to hold on to the data for now for the inital shake down.
February 18, 2010 at 2:22 pm
Try creating in a Test Database.
I removed the Database Name Qualifier from the column name that you are getting the error?
--USE [TrailerManagement]
--GO
/****** Object: Table [dbo].[UserProfileDetails] Script Date: 02/18/2010 15:30:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UserProfileDetails](
[Id] [int] NOT NULL,
[UserProfileShortName] [nvarchar](50) NULL,
[MenuFunctionShortName] [nvarchar](50) NULL
) ON [PRIMARY]
GO
SELECT TOP 1000 [Id]
,[UserProfileShortName]
,[MenuFunctionShortName]
FROM [dbo].[UserProfileDetails]
Look at the bright side, your working 🙂
Let me know if you need any help.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply