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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 how to eliminate the null values

Author  Topic 

born2acheive
Yak Posting Veteran

65 Posts

Posted - 2006-11-20 : 23:45:26
hi, i have null values in my table , i want to eliminate the null values.
ie
this is my query
select p_type from process_general
output:
1.BSB HEATER PACKAGE
2.

so in my output one data and one null field is there. so i want to show output with out that null field, becos i am filling this datas in my combobox.so i need with out null field.please give me query for this,pleaseeeeeeeeeeeee

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-11-20 : 23:48:34
[code]select p_type from process_general where p_type is not null[/code]


KH

Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-21 : 01:31:46
Just to be sure, since the output above does not contain NULL, rather than empty space,
use this to complement khtans suggestion

select distinct p_type from process_general where len(isnull(p_type, '')) > 0


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

born2acheive
Yak Posting Veteran

65 Posts

Posted - 2006-11-21 : 02:40:16
thanks a lot friends, i got it
Go to Top of Page
   

- Advertisement -