using (SqlCommand sqlCommand = new SqlCommand()) { sqlCommand.CommandType = CommandType.Text; sqlCommand.CommandText = @";merge dbo.gst_actv as trgt using (select cast(pass_no as char(16)) as ref_no from dbo.gst_pass where pending = 1 and salespoint = @salespoint) as srce on trgt.ref_no = srce.ref_no when matched and trgt.activ_type between 100 and 199 then delete; delete dbo.gst_pass where pending = 1 and salespoint = @salespoint;"; sqlCommand.Parameters.Add("@salespoint", SqlDbType.Char, 6).Value = this.CurrentSalespoint; database.ExecuteSqlCommand(sqlCommand, CommandExecutionType.NonQuery); messageText = this.GetFormattedReturn(); }The error is this: