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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | 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
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AdamWest
Constraint Violating Yak Guru

USA
360 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
15732 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  
 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.02 seconds. Powered By: Snitz Forums 2000