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
 Transact-SQL (2000)
 regading NOT Null query

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-10-03 : 07:55:01
Rajsekhar writes "Hi,

I'm Rajsekhar I have one problem in sqlserver 2000.

Problem:

I have a product_header table I want to retive the data from this table. condition is I don't want to display the NULL Column I wnat to disply only NOT NULL Columns

Plz help me out

I have written the query like


SELECT distinct name1,dept,design,deptno,office
FROM test1,SysObjects INNER JOIN SYSCOLUMNS ON SYSOBJECTS.ID = SYSCOLUMNS.ID
INNER JOIN SYSTYPES ON SYSTYPES.xtype = SYSCOLUMNS.xtype
where syscolumns.offset is not null


Armba Develpment NULL 10 NULL
reamd Develpment NULL 20 NULL
ereamd rewsf NULL 30 NULL



I don't want to display null cols

plz help me

Thank you

regards
Rajsekhar"

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2005-10-03 : 08:37:39
SELECT distinct name1,dept,design,deptno,office
FROM test1,SysObjects INNER JOIN SYSCOLUMNS ON SYSOBJECTS.ID = SYSCOLUMNS.ID
INNER JOIN SYSTYPES ON SYSTYPES.xtype = SYSCOLUMNS.xtype
where syscolumns.offset is not null

AND OFFICE IS NOT NULL
AND DESIGN IS NOT NULL
Go to Top of Page
   

- Advertisement -