Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
No one know Datagridview vertical fields?
Message
 
 
À
03/06/2011 05:45:44
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows XP
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01512516
Message ID:
01512698
Vues:
41
>Thank you Naomi Nosonovsky for reply me. I use ms sql server 2005 , i already read the PIVOT command .
>But i don't konw how can i use. Or i think my case can't use this command to do, May you teacher and give some idea, thank you .
>
>
>
>My database struture (select funcid,add,update,delete,print,generate from AccessRight)
> "0001" "1' "1' "1" "0" "0" all data store string
>
>I want to output datagridview interface
>
>Module Right    Grant
>----------              ---------- 
>add                        "1"        ( will change this data to check box)
>update                 " 1"    
>delete                   "1"
>print                       "0"
>generate              "0"
I see, I misunderstood your original structure. In your case you need UNPIVOT, e.g.
select * from AccessRights UNPIVOT ([Grant] FOR [Module Right] IN ([Add],[Update],[Delete],[Print],[Generate])) unpvt
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform