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...

Hi all,

I need query help for below senorio, could you please help
me.

TableName = City
CITYID ContinuationID CITYNAME
1 1 SAN
1 2 DIEGO
2 1 SAN
2 2 FRANCISCO
3 1 CHICAGO
4 1 NEW
4 2 YORK
4 3 CITY

Could you please help me to write a generalized SQL that
returns results as given below in the

Query result
CITYID NAME1 NAME2 NAME3 NAME4 NAME5
1 SAN DIEGO
2 SAN FRANCISCO
3 CHICAGO
4 NEW YORK CITY

Answer Posted / das

select cityid,group_concat(cityname) as city from city group by cityid;

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is global temp table?

984


Explain query editor regions

1030


What are the export options of ssrs?

173


What is SQL Azure Fabric?

110


What are the new features introduced in SQL Server 2000? What changed between the previous version of SQL Server and the current version?

2347


How to create a scrollable cursor with the scroll option?

980


What is the contrast between sql and pl/sql?

1117


What is rolap and its advantage? : sql server analysis services, ssas

1260


How many columns can we include on clustered index ?

968


Explain can you implement data mining in ssrs?

158


What is normalization according to you and explain its different levels?

931


Define inner join in sql server joins?

1041


Explain logical operators in sql server?

1089


What is snapshot report?

163


How to perform backup for certificates in sql server? : sql server security

1072