This is my table
create table table1(action1 varchar(10),view1 varchar(10))
insert into table1 values('A1','VIEW'),('A1','EDIT'),('A2','VIEW'),('A3','VIEW'),('A3','EDIT')
I need output like this !
action1 VIEW EDIT
A1 VIEW EDIT
A2 VIEW NULL
A3 VIEW EDIT
I tried using pivot but I get error Msg 102, Level 15, State 1, Line 8
Incorrect syntax near '('.