CREATE PROCEDURE [dbo].[DKNTMetaData] @HotelCustomerNumber INT AS
SET NOCOUNT ON
/*
  Created by Kent Johansen, Novemer 2022

  Changes:
*/

DECLARE @HotelType VARCHAR(100)
DECLARE @LastName VARCHAR(60)
DECLARE @Address VARCHAR(100)
DECLARE @ZipCode VARCHAR(10)
DECLARE @City VARCHAR(50)

SELECT @HotelType = KeyValue FROM HotelSetUp WITH (NOLOCK) WHERE SearchKey = 'DKNTHotelType'
IF ISNULL(@HotelType, '') = ''
  SET @HotelType = 'Unknown'

SELECT @LastName = LastName, @Address = Address1, @ZipCode = ZipCodeOverwrite, @City = CityOverWrite 
FROM Customer WITH (NOLOCK)
WHERE CustomerNumber = @HotelCustomerNumber

SELECT @LastName AS HotelName, @HotelType AS HotelType, 
@Address AS Address, @ZipCode AS ZipCode, @City AS City