About reporting
-
i need to get report from a table which has questionId field, studentId, inquiryId like that and there are 80 questions and 300 students replied this inquiry. I need a result like below (question=q) inqueryId studentId q1 q2 q3 q4 q5 ..... q79 q80 7 123 a b b c d e c 7 245 b c d e e c c i create temporary table has 80 question field but i cant fill it from my original table
Sampiyon FENERBAHCE
-
i need to get report from a table which has questionId field, studentId, inquiryId like that and there are 80 questions and 300 students replied this inquiry. I need a result like below (question=q) inqueryId studentId q1 q2 q3 q4 q5 ..... q79 q80 7 123 a b b c d e c 7 245 b c d e e c c i create temporary table has 80 question field but i cant fill it from my original table
Sampiyon FENERBAHCE
U need to craete a dynamic query for inserting data in the table like declare @Dynstr varchar(4000) set @Dynstr ='update #TempDyamicWeek SET col'+cast(@count1 as varchar(10)) +' =#TempDurByWeek.duration from #TempDyamicWeek inner join #TempDurByWeek on #TempDyamicWeek.userid= #TempDurByWeek.userid and #TempDyamicWeek.type=#TempDurByWeek.type and #TempDurByWeek.WeekEnding= '''+convert(varchar(30),@CurDateTo,121)+'''' exec (@Dynstr) please coorect the colume name according to yours.. Thanks Hem
-
U need to craete a dynamic query for inserting data in the table like declare @Dynstr varchar(4000) set @Dynstr ='update #TempDyamicWeek SET col'+cast(@count1 as varchar(10)) +' =#TempDurByWeek.duration from #TempDyamicWeek inner join #TempDurByWeek on #TempDyamicWeek.userid= #TempDurByWeek.userid and #TempDyamicWeek.type=#TempDurByWeek.type and #TempDurByWeek.WeekEnding= '''+convert(varchar(30),@CurDateTo,121)+'''' exec (@Dynstr) please coorect the colume name according to yours.. Thanks Hem
thanks a lot
Sampiyon FENERBAHCE