SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Error in this query
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AdamWest
Constraint Violating Yak Guru

USA
348 Posts

Posted - 02/20/2013 :  09:18:40  Show Profile  Reply with Quote
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

USA
15636 Posts

Posted - 02/20/2013 :  09:19:36  Show Profile  Visit robvolk's Homepage  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000