Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to display n-1 columns from n number of columns, from a
single table in MS SQL server 2005?

Answer Posted / rajesh ranjan

Declare @ColumnName varchar(50)
select @ColumnName=Name from syscolumns where id=object_id
(Table_Name) and colid=1 --2 for second Column, 3 for third
exec ('select '+@ColumnName+' from Table_Name')

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is unique key constraint?

1045


What does truncate do?

934


What is the difference between for xml raw and for xml auto?

1024


Tell me what is de-normalization and what are some of the examples of it?

1016


Define cursor locking

995


When to use null data driven subscription?

206


What is the optimal disk configuration for a database server and what raid configurations would you use if budget is not a constraint?

956


How do I edit a procedure in sql server?

948


Explain what is public role in sql server?

1115


What is sql server english query?

1111


After creating the cube, if we added a new column to the oltp table then how you add this new attribute to the cube? : sql server analysis services, ssas

946


What is row-level compre?

990


Can you force a query to use a specific index?

933


What is the process of normalising?

993


How can i Relate Tables in SSIS

1076