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 |
|
sg2255551
Constraint Violating Yak Guru
274 Posts |
Posted - 2009-03-28 : 01:45:53
|
| hiI have a list of Customers:ContactName------------------------------Alejandra CaminoAlexander FeuerAna TrujilloAnabela DominguesAndré FonsecaAnn DevonAnnette RouletAntonio MorenoAria CruzArt BraunschweigerBernardo BatistaCarine SchmittCarlos GonzálezCarlos HernándezCatherine DeweyChristina BerglundDaniel ToniniDiego RoelDominique PerrierEduardo SaavedraElizabeth BrownElizabeth LincolnFelipe IzquierdoFran WilsonFrancisco ChangFrédérique CiteauxGeorg PippsGiovanni RovelliGuillermo FernándezHanna MoosHari KumarHelen BennettHelvetius NagyHenriette PfalzheimHorst KlossHoward SnyderIsabel de CastroJaime YorresJanete LimeiraJanine LabruneJean FresnièreJohn SteelJonas BergulfsenJose PavarottiJosé Pedro FreyreJytte PetersenKarin JosephsKarl JablonskiLaurence LebihanLino RodriguezLiu WongLiz NixonLúcia CarvalhoManuel PereiraMaria AndersMaria LarssonMarie BertrandMario PontesMartín SommerMartine RancéMary SaveleyMatti KarttunenMaurizio MoroniMichael HolzMiguel Angel PaolinoPalle IbsenPaolo AccortiPascale CartrainPatricia McKennaPatricio SimpsonPaul HenriotPaula ParentePaula WilsonPedro AfonsoPeter FrankenPhilip CramerPirkko KoskitaloRenate MessnerRene PhillipsRita MüllerRoland MendelSergio GutiérrezSimon CrowtherSven OttliebThomas HardyVictoria AshworthYang WangYoshi LatimerYoshi TannamuriYvonne MoncadaZbyszek Piestrzeniewiczand i want to group them by Aplhabetical order in this manner. How do i go about it? ThanksContactName------------------------------AAlejandra CaminoAlexander FeuerAna TrujilloAnabela DominguesAndré FonsecaAnn DevonAnnette RouletAntonio MorenoAria CruzArt BraunschweigerBBernardo BatistaCCarine SchmittCarlos GonzálezCarlos HernándezCatherine DeweyChristina BerglundDDaniel ToniniDiego RoelDominique PerrierEEduardo SaavedraElizabeth BrownElizabeth LincolnFFelipe IzquierdoFran WilsonFrancisco ChangFrédérique CiteauxGGeorg PippsGiovanni RovelliGuillermo FernándezHHanna MoosHari KumarHelen BennettHelvetius NagyHenriette PfalzheimHorst KlossHoward SnyderIIsabel de CastroJJaime YorresJanete LimeiraJanine LabruneJean FresnièreJohn SteelJonas BergulfsenJose PavarottiJosé Pedro FreyreJytte PetersenKKarin JosephsKarl JablonskiLLaurence LebihanLino RodriguezLiu WongLiz NixonLúcia CarvalhoMManuel PereiraMaria AndersMaria LarssonMarie BertrandMario PontesMartín SommerMartine RancéMary SaveleyMatti KarttunenMaurizio MoroniMichael HolzMiguel Angel PaolinoPPalle IbsenPaolo AccortiPascale CartrainPatricia McKennaPatricio SimpsonPaul HenriotPaula ParentePaula WilsonPedro AfonsoPeter FrankenPhilip CramerPirkko KoskitaloRRenate MessnerRene PhillipsRita MüllerRoland MendelSSergio GutiérrezSimon CrowtherSven OttliebTThomas HardyVVictoria AshworthYYang WangYoshi LatimerYoshi TannamuriYvonne MoncadaZZbyszek Piestrzeniewicz |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-03-28 : 02:54:50
|
| [code]SELECT ContactName FROM Table ORDER BY ContactName[/code]and required output format can be easily obtained using reporting tools. |
 |
|
|
sg2255551
Constraint Violating Yak Guru
274 Posts |
Posted - 2009-03-28 : 04:32:27
|
| hi I found the solution:select Substring(ContactName,1,1) from dbo.Customersunionselect ContactName from dbo.Customers |
 |
|
|
|
|
|