thank you r937 that worked although i used it without the %
it irritates me tho because i tried this once and it didnt work. but works great now thanks again
no i just forgot to delete that ')' before posting but more detail on my problem is this:
if i type this:
exec spBalanceRange @VendorVar = 'Vendor'
i get this error:
Invalid column name 'Vendor'.
so if it using a column name:
exec spBalanceRange @VendorVar = 'VendorName'
it runs it.
i dont...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.