--SQL_VerifyTableWithTrayJob declare @jobId varchar(20), @trayId varchar(20), @tableId varchar(20) set @jobId = '{0}' set @trayId = '{1}' set @tableId = '{2}' select top 1 [Job No_] from [Green Circle Growers$Container Entry] (nolock) where [Container Type] = 1 and [Job No_]=@jobId and Barcode = @trayId AND [Storage No_] = @tableId