question

JulioBello-4525 avatar image
0 Votes"
JulioBello-4525 asked MelissaMa-msft commented

SQL Server Management Studio: Invalid Columns

Hi, Everybody!

Can anyone PLEASE enlighten me as to WHY SQL Server Management Studio (v17.4) would flag the following columns as invalid?... The ones with the squiggly red underlines?

98386-select-top-1000-trackingdataid.png

Please see table definition below…

 USE [TrackingService]
 GO
    
 /****** Object:  Table [dbo].[TrackingData]    Script Date: 5/20/2021 8:51:16 PM ******/
 SET ANSI_NULLS ON
 GO
    
 SET QUOTED_IDENTIFIER ON
 GO
    
 CREATE TABLE [dbo].[TrackingData](
        [TrackingDataID] [bigint] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
        [Carrier] [nvarchar](10) NULL,
        [EventCode] [nvarchar](10) NULL,
        [EventDescription] [nvarchar](50) NULL,
        [EventDateTimeUTC] [datetime] NULL,
        [EventCity] [nvarchar](50) NULL,
        [EventCountryCode] [nvarchar](2) NULL,
        [EventCountry] [nvarchar](50) NULL,
        [Mailbag] [nvarchar](50) NULL,
        [FreightForwarder] [nvarchar](50) NULL,
        [Hawb] [nvarchar](50) NULL,
        [Mawb] [nvarchar](50) NULL,
        [ItemID] [nvarchar](20) NULL,
        [CustomerItemID] [nvarchar](20) NULL,
        [DestinationCity] [nvarchar](50) NULL,
        [DestinationState] [nvarchar](50) NULL,
        [DestinationZip] [nvarchar](50) NULL,
        [DestinationCountryCode] [nvarchar](50) NULL,
        [DestinationCountry] [nvarchar](50) NULL,
        [CustomerNumber] [char](10) NULL,
        [ClientNumber] [nvarchar](20) NULL,
        [ClientName] [nvarchar](50) NULL,
        [MsiTrackingID] [nvarchar](20) NULL,
        [VendorTrackingID] [nvarchar](20) NULL,
        [FinalCarrierTrackingID] [nvarchar](20) NULL,
        [FinalCarrierVendor] [nvarchar](50) NULL,
        [FileID] [char](13) NULL,
        [SendOutDateUTC] [datetime] NULL,
        [CreatedDataTimeUTC] [datetime] NOT NULL,
        [LgTrackID] [nvarchar](20) NULL,
        [CaTrackID] [nvarchar](20) NULL,
        [Bc] [nvarchar](50) NULL,
 CONSTRAINT [PK_TrackingData] PRIMARY KEY CLUSTERED 
 (
        [TrackingDataID] ASC
 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
 ) ON [PRIMARY]
 GO


sql-server-generalsql-server-transact-sqlsql-server-integration-services
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @JulioBello-4525,

Could you please validate and provide any update?

Please remember to accept the answers if they helped. Your action would be helpful to other users who encounter the same issue and read this thread. 

Thank you for understanding!

Best regards,
Melissa

0 Votes 0 ·

1 Answer

MelissaMa-msft avatar image
0 Votes"
MelissaMa-msft answered

Hi @JulioBello-4525,

Welcome to Microsoft Q&A!

We have to refresh our cache after we create new tables/add columns/ new views and so on.

You could try with Keyboard shortcut: Ctrl + Shift + R

Or, using the menu: Edit -> IntelliSense -> Refresh Local Cache.

I tested it in my own environment and it worked.

Best regards,
Melissa


If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.