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 |
|
krishna_yess
Yak Posting Veteran
81 Posts |
Posted - 2008-09-23 : 06:52:09
|
My SELECT statement returns following results------ ------ Item Count------ ------a 120b 100v 50 d 90------ ------ i need to put one dummy row at the end. "dummy" is not present in the table.like this------ ------ Item Count------ ------a 120b 100v 50 d 90dummy 0------ ------ thanks |
|
|
Vadivu
Starting Member
31 Posts |
Posted - 2008-09-23 : 07:23:05
|
| try adding a union with ur select query like the followingselect item, count from [tablename]union (select 'dummy',0) |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-09-23 : 07:34:28
|
quote: Originally posted by Vadivu try adding a union with ur select query like the followingselect item, count from [tablename]union (select 'dummy',0)
use union all rather than union.union takes distinct of results and hence performance might suffer compared to union all. |
 |
|
|
|
|
|