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 |
|
born2acheive
Yak Posting Veteran
65 Posts |
Posted - 2006-10-04 : 06:04:56
|
| hi, i have 5 columns in my tablename age phone sex salary dani 21 1233 m see this output, there salary is null. actually i want to use * (ie)select * from emp, if i use this the following output has to comename age phone sex dani 21 1233 m becos there is no value in salary column.so please tall me how to do this,please give me query to do this. |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-10-04 : 06:07:40
|
if you use select * from table it will return all columns in table.What is your requirement ? KH |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-10-04 : 06:10:46
|
| resultsets are square - you can't include columns for some rows only.If you use select * you will get all columns including null values.You can list the columns to exclude those you don't want but that will be for all rows.You can format the resultset into a single column with whatever format you want.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-10-04 : 06:52:02
|
| Why not have your front end just not display the columns that are NULL ?Kristen |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-10-04 : 11:06:34
|
quote: Originally posted by Kristen Why not have your front end just not display the columns that are NULL ?Kristen
Thats what I wanted to ask the questioner MadhivananFailing to plan is Planning to fail |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|
|