troubleshooting Question

sql condition using and

Avatar of tips54
tips54 asked on
Microsoft SQL Server 2005SSRSSQL
4 Comments1 Solution175 ViewsLast Modified:
I'm about to loose my mind. I checking some data and i'm getting some output I don't think I should get.  Data look like:
ID :  AmtPaid:    Balance
1        200           0
2        200           10
Select ID from Table1 where ID =1 and (AmtPaid <>0 and Balance <>0)
The above statement does not return the data for ID 1. I was expecting output since i'm using And not OR. am I missing something.

thanks in advance.

Chris Luttrell
Senior Database Architect

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros