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 2005 Forums
 Transact-SQL (2005)
 How to Select Empty Column Value From the table?

Author  Topic 

umapathy
Starting Member

24 Posts

Posted - 2007-04-19 : 06:45:37
Hi All,

I have one table namely emp.i have some sample data in this table.

name age Degree ExtraQualification
x 25 B.E MCP
Y 30 M.CA
Z 40 M.E MCSD
A 23 B.Sc
B 45 B.Sc MCP
C 50 B.A

I want to select this table.it sholud display - hypen value in the colum those who are not yeild ExtraQualification. like the follwoing

name age Degree ExtraQualification
x 25 B.E MCP
Y 30 M.CA -
Z 40 M.E MCSD
A 23 B.Sc -
B 45 B.Sc MCP
C 50 B.A -


Please Reply for this issue

REGARDS
Umapathy

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-04-19 : 06:47:42
How to you tell which records that require extra qualification? What are the rules for that?
We can't read minds and are tired of guessing.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

umapathy
Starting Member

24 Posts

Posted - 2007-04-19 : 06:53:44
it is like column Feild

Umapathy
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-04-19 : 06:53:44
[code]select
name, age, Degree, Coalesce(NullIf(ExtraQualification, ''), '-') as ExtraQualification
From emp[/code]



Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page
   

- Advertisement -