Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How To Do A Cross Tab
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01520803
Message ID:
01520954
Vues:
23
Ok, it's time to step back and rethink this.

I don't understand the syntax you've been providing, but I do know that what I want to do CANNOT really be this difficult. Let me restate my goals.


In table tblCamp_CT I have 2 columns MailCounty and Precinct. There are multiple occurances of each precinct in each county, as in
MailCounty     Precinct
=============================
County A        Precinct 1
County A        Precinct 2
County A        Precinct 2
County A        Precinct 2
County A        Precinct 3
County B        Precinct 4
County B        Precinct 5
County B        Precinct 5
County B        Precinct 6
County C        Precinct 7
County D        Precinct 8
County D        Precinct 8
County D        Precinct 9
What I want back is
County A      County B     County C      County D     
==========================================================
Precinct 1    Precinct 4   Precinct 7    Precinct 8
Precinct 2    Precinct 5                 Precinct 9 
Precinct 3    Precinct 6
So, each county should become a column, and each precinct should only appear once under the county it belongs in.

So far, all the code you've provided have returned different and inaccurate results. I am grateful for the help, but I can't beleive it's really this difficult. What are we doing wrong here?

Thanks
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform