--declare @packageNumber int --declare @orderNumber nvarchar(20) --set @orderNumber = 'GS00005390' --set @packageNumber = 101713 select [Layer No_], Description, [Quantity per Layer] from [Green Circle Growers$GCG Package Line] ln (nolock) where [Source Document No_] = @orderNumber and [Package No_] = @packageNumber