select IdArtikelVarianten AS AV,
	ArtikelVariantenAlias AS AVDescription,
	convert(date,AbrufLadeDatum,23) As DeliveryDate,
	idlieferadresse AS DeliveryAddress,
	LieferAdressBez,
	AuftragsNummer AS PO_Number,
	IdAuftragsPosition AS LineITEM,
	IdAuftragsAbruf AS ReleaseNumber,
	AbrufMengeVPK AS PalletsRequested,
	AbrufMenge AS PiecesRequested,
	GelieferteMengeVPK AS DeliveredPallets,
	GelieferteMenge AS DeliveredQTY,
	case when LieferAdressBez Like '%alpla%' Then 'AlplaPlant' ELSE 'Customer' End as CustomerType
from alplaprod_test1.dbo.V_TrackerAuftragsAbrufe (nolock)
where AbrufLadeDatum between '[startDate]' and '[endDate]'