Lynn yes i didnt ! I just saw the format in which things were placed in the article!
Table DDL:
USE [OEAS]
GO
/****** Object: Table [dbo].[51] Script Date: 04/05/2013 21:07:16 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[51](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[Exam_ID] [bigint] NOT NULL,
[Paper_ID] [bigint] NOT NULL,
[Question_ID] [bigint] NOT NULL,
[Section_ID] [bigint] NOT NULL,
CONSTRAINT [PK_51] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
Sample data :
INSERT INTO [OEAS].[dbo].[51] ([Exam_ID] ,[Paper_ID] ,[Question_ID] ,[Section_ID]) VALUES (1,1,3,1)
INSERT INTO [OEAS].[dbo].[51] ([Exam_ID] ,[Paper_ID] ,[Question_ID] ,[Section_ID]) VALUES (1,1,6,1)
INSERT INTO [OEAS].[dbo].[51] ([Exam_ID] ,[Paper_ID] ,[Question_ID] ,[Section_ID]) VALUES (1,1,10,1)
INSERT INTO [OEAS].[dbo].[51] ([Exam_ID] ,[Paper_ID] ,[Question_ID] ,[Section_ID]) VALUES (1,1,14,1)
Output Expected :
1 ; 3 | 2 ; 6 | 3 ; 10 | 4 ; 14 |