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
What is global temp table?
Explain query editor regions
What are the export options of ssrs?
What is SQL Azure Fabric?
What are the new features introduced in SQL Server 2000? What changed between the previous version of SQL Server and the current version?
How to create a scrollable cursor with the scroll option?
What is the contrast between sql and pl/sql?
What is rolap and its advantage? : sql server analysis services, ssas
How many columns can we include on clustered index ?
Explain can you implement data mining in ssrs?
What is normalization according to you and explain its different levels?
Define inner join in sql server joins?
Explain logical operators in sql server?
What is snapshot report?
How to perform backup for certificates in sql server? : sql server security