>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