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.
| Author |
Topic |
|
bulubuk1976
Starting Member
24 Posts |
Posted - 2008-03-21 : 03:22:42
|
| I am trying to query my records using a text field. However, I want my results to be all when there the text field is blank. Currently I have 257134 records but when I use my code, it is only showing 237423 records. Here is my code:SELECT COUNT(ID) AS CountFROM ViewAllEmployeesWHERE (JobDescription1 LIKE '%')Any ideas as to what wildcard to use to show NULL and Not NULL records?Thank so much |
|
|
booyeeka
Starting Member
10 Posts |
Posted - 2008-03-21 : 05:53:57
|
| maybe you can find an answer on next link:http://weblogs.asp.net/rmclaws/archive/2004/02/18/75381.aspx |
 |
|
|
tosscrosby
Aged Yak Warrior
676 Posts |
Posted - 2008-03-21 : 11:23:08
|
| Depending on what you're trying to do.....SELECT COUNT(ID) AS CountFROM ViewAllEmployeesWHERE (JobDescription1 IS NOT NULL)orSELECT COUNT(ID) AS CountFROM ViewAllEmployeesWHERE (JobDescription1 IS NULL)orSELECT COUNT(ID) AS CountFROM ViewAllEmployeesWHERE (JobDescription1 = '') -- blank fieldTerry |
 |
|
|
|
|
|