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