| | |
Problem With "Where" with boolean type
Please support our MS SQL advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Apr 2006
Posts: 88
Reputation:
Solved Threads: 2
Hi all,
Well I am still new to sql to getting better and better with each query. Now this one has me completley stumped.
Here is the query
This return 37 rows but there is two rows that have CHKCANCEL = 1
Any Ideas??
Thx
Well I am still new to sql to getting better and better with each query. Now this one has me completley stumped.
Here is the query
MS SQL Syntax (Toggle Plain Text)
SELECT * FROM MOTORS WHERE (CHKCANCEL = '0') AND (DITD IS NULL) AND (CUSTOMERID = '52') OR (CUSTOMERID = '62') OR (CUSTOMERID = '72')
This return 37 rows but there is two rows that have CHKCANCEL = 1
Any Ideas??
Thx
Last edited by blacklocist; Aug 24th, 2006 at 3:25 pm. Reason: Forgot select command in the example
•
•
Join Date: Apr 2006
Posts: 88
Reputation:
Solved Threads: 2
I used this syntax and it work perfectly.
MS SQL Syntax (Toggle Plain Text)
USE MTRTRK SELECT * FROM MOTORS WHERE CUSTOMERID IN ('52', '72', '62') AND CHKCANCEL = '0' AND DITD IS NULL
![]() |
Similar Threads
- "Application uses Value of wrong type for the current operation" (Visual Basic 4 / 5 / 6)
- cannot get the sendmail to actualy send an email with the form selections (PHP)
- Pls Help vb $ excell “Couldn't find installable ISAM� error. (Community Introductions)
- Have a problem with centering "jpg" files (HTML and CSS)
- "Problem in MultiThreading" (Java)
Other Threads in the MS SQL Forum
- Previous Thread: SQL query
- Next Thread: Fulltext search with MS SQL
| Thread Tools | Search this Thread |
Tag cloud for MS SQL
"last autogrowth business connectingtodatabaseinuse count cursor data database dateadd datepart day" dbsize deadlock delete_trigger getdate highperformancecomputing hpc hpcserver2008 ibm iis loop maximum microsoft ms mssql multiple multithreading news number permission query reporting result server services sets source sql sqlserver sqlserver2005 supercomputing tables uniqueid update view weekday





