if you havent already created table, you can use this with create table alsoCREATE TABLE MsgDetails([TrnxNo] [numeric](18, 0) IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,[HeaderNo] [numeric](18, 0) NOT NULL,[Indicator] [char](10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,CONSTRAINT [PK_tfpxPay_RRMsgDet] PRIMARY KEY CLUSTERED ([RRMsg_TrnxNo] ASC)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]CONSTRAINT [UQ_Header_No] UNIQUE) ON [PRIMARY]