Reputation: 79
Getting this error with the following query in SQL Server 2012.
AND Invoice_Header.Invoice_date >= '2005-02-28'
AND(LTRIM(RTRIM(@carrierselect)))
--Error on this line of code
AND CATEGORY IN ('MEDP', 'MEDG')
AND invoice_status_code <> 'L'
Upvotes: 1
Views: 5284
Reputation: 31879
Your error is here:
AND(LTRIM(RTRIM(@carrierselect)))
You do not have any comparison that will result to a boolean value. You must have forgotten to put something there:
AND(LTRIM(RTRIM(@carrierselect))) = 'something'
Upvotes: 1