Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert table View
Message
 
 
À
09/04/2008 09:01:15
Issam Mansour
Jordan Business Machines
Amman, Jordanie
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01309263
Message ID:
01309267
Vues:
7
It cannot be done in one query in SQL 2000 and earlier. In SQL 2005 look up UNPIVOT and PIVOT relational operators.

>I have an accounting table with 5 year of data for an account, the table headers look as following
>
>Acctno___Year___db_1,db_2,db,db_3,db4,….db_12,Cr_1,cr_2,cr_3…,cr-12
>
>I want to with select statement to convert the data to query the header must be the following:-
>
> Years1___Year2___year3___year4____year5
>Db_1
>Db_2
>Db_3
>.
>.
>.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform