Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Error in this query

Author  Topic 

AdamWest
Constraint Violating Yak Guru

360 Posts

Posted - 2013-02-20 : 09:18:40
I Have this simple query but get error message:
Msg 4145, Level 15, State 1, Line 5
An expression of non-boolean type specified in a context where a condition is expected, near 'ON'.


SELECT * FROM PTC.ORD_M_ORDER
WHERE ORDER_STATUS IN (4,7,8)
AND FACILITY_KEY = FacilityKey
AND RENEWED_FROM IS NULL
AND SIGNED ON >= FromDate and SIGNED_ON <= ThruDate;

robvolk
Most Valuable Yak

15732 Posts

Posted - 2013-02-20 : 09:19:36
SELECT * FROM PTC.ORD_M_ORDER
WHERE ORDER_STATUS IN (4,7,8)
AND FACILITY_KEY = FacilityKey
AND RENEWED_FROM IS NULL
AND SIGNED_ON >= FromDate and SIGNED_ON <= ThruDate;
Go to Top of Page
   

- Advertisement -