Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
capjlp
Starting Member
19 Posts |
Posted - 2011-08-08 : 14:08:25
|
Hi FolksI am trying to build a aspx page to show a collapsible panel display and rearrange the data to look the way I want. I will also be using this for some reports so the same sql query will serve my purpose. So I would like help creating a sql query that gives me the out put the way i need it to look for my grid view in asp.net... Thanks in advance.I have 3 tables and there for 3 tiers to collapseMy goals Table and first Tier I will select IdGoal, GoalDescription,DashboardTrack,UpdatedUser,UpdatedDate by Fiscal Year and IdTeamtblGoals My second table / tier I will select Indicator ID , IndicatorName,IndicatorNotes,AnnualTarget,T1Target,T2Target,T3Target,FiveYearPlanName,Username,UpdateDate by the IdGoal from abovetblIndicators My Third Tier and most of my headaches ... its more about how to query the data from this table to the way I want to display it. I will be selecting a Indicator from above then querying the data for that indicatorID. I need help writing this query. I think I can get the collapsable panels to work but I have never done more than one tier deep in a panel.tblMonthlyHistory They way I want to display this MonthlyHistory Table is by Month for the Year this will be a Dashboard view where the user can see how they are doing for the year for there programs.Displayed History I am fairly new to SQL and ASP.net. I do appreciate the help from these forums. I have tried to make this work for a couple of work days but I have only been able to get the first two to work out right.Thank youCapJLP |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2011-08-09 : 02:51:53
|
| use pivot function |
 |
|
|
capjlp
Starting Member
19 Posts |
Posted - 2011-08-09 : 13:51:14
|
| I will look that up. I am new to Sql so I am not sure what that function is thanks for the tip.ThanksCapJLP |
 |
|
|
capjlp
Starting Member
19 Posts |
Posted - 2011-08-09 : 15:14:49
|
| Well I found some information on Pivot tables but there really simple and I am not sure how to adapt those to my more complex pivot.The information i found was herehttp://www.ehow.com/about_5336679_pivot-table-sql.htmlI found several examples but all were as simple aka not as complicated is what I am trying to pull off. I am also not doing any summing or averaging on my numbers till the end of the year column that i havent added to the mix yet.Any suggestions on some information that might be more down my path of complexity |
 |
|
|
|
|
|
|
|