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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 select query where condition <> ''

Author  Topic 

reddymade
Posting Yak Master

165 Posts

Posted - 2006-09-11 : 22:36:12
i am using the following query, under where condition i am saying <>''

still it is getting the module type records where it is empty.

select distinct ModuleType from TAB_ccsNetlabels where ModuleType<>'' order by ModuleType

Can you please tell me how should i use the where clause.

Thank you very much.

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-09-11 : 22:39:29
there is nothing wrong with the where clause.

What is the datatype of ModuleType ? varchar or char ?


KH

Go to Top of Page

reddymade
Posting Yak Master

165 Posts

Posted - 2006-09-11 : 22:51:14
Datatype is nvarchar(50)

under moduletype i is empty space, it does'nt show <NULL>

Thks.
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-09-11 : 22:56:38
ModuleType contain not printable chars ?

try len(ModuleType) = 0


KH

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-09-13 : 10:19:51
Try ISNULL(col,'')<>''

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -