i shortned this procedure. but im havving problems with the like clause in this, it says it cannot find the column which i dont understand
CREATE PROC spBalanceRange
@VendorVar VARCHAR(50) = NULL,
AS
DECLARE @QUERY VARCHAR(1000)
SET @QUERY = 'SELECT VendorName, InvoiceNumber, PaymentTotal AS...