In a t-sql 2012 table, I have a table that contains the following table definition:
CREATE TABLE [dbo].[TranscriptCourse](
[transcriptID] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
[personID] [int] NOT NULL,
[startYear] [smallint] NULL,
[endYear] [smallint] NULL)
In this TranscriptCourse table, there can be lots of records for each personID. This personID can have lots of different values for endYear. I need to have a query by personID where there is not a record for endYear = 2013.
Thus can you show me the sql to solve this issue?