Sounds to me like you are trying to execute a stored procedure with the "WHERE" part as your input parameter...
exec stp_deliverystatus @customernumber = 263722
Full syntax:
USE [Galactic]
GO
DECLARE @return_value int
EXEC @return_value = [dbo].[stp_deliverystatus]
@customernumber =...