Click here to Skip to main content
15,909,193 members
Home / Discussions / Database
   

Database

 
AnswerRe: Audit Trail : Single table for all users or multiple table per user Pin
musefan6-Mar-11 22:57
musefan6-Mar-11 22:57 
GeneralRe: Audit Trail : Single table for all users or multiple table per user Pin
Dave Kerr6-Mar-11 23:03
mentorDave Kerr6-Mar-11 23:03 
GeneralRe: Audit Trail : Single table for all users or multiple table per user Pin
musefan6-Mar-11 23:36
musefan6-Mar-11 23:36 
AnswerRe: Audit Trail : Single table for all users or multiple table per user Pin
Eddy Vluggen7-Mar-11 0:15
professionalEddy Vluggen7-Mar-11 0:15 
AnswerRe: Audit Trail : Single table for all users or multiple table per user Pin
Wendelius7-Mar-11 1:52
mentorWendelius7-Mar-11 1:52 
QuestionUpgrading MSDE SP4 to SQL 2008 Express R2 Pin
Elsie6-Mar-11 19:46
Elsie6-Mar-11 19:46 
QuestionSQL Help - sum items based on max but also smaller than...? Pin
GlobX6-Mar-11 17:09
GlobX6-Mar-11 17:09 
AnswerRe: SQL Help - sum items based on max but also smaller than...? Pin
Wendelius7-Mar-11 7:40
mentorWendelius7-Mar-11 7:40 
Hi,

First I must admit that I didn't follow the whole sequence, but if I understood correctly, you want to have each sprint date and the for every sprint date the sum of points for that and earlier dates. If that's correct, could you simply use scalar in your select list to calculate a running total. Something like:

SELECT d.Day,
       d.[Day Of Year],
       (SELECT SUM(Points)
        FROM   #tickets t
        WHERE  t.[Changed Date] <= d.[Day Of Year]
        ...other possible restrictions...) AS Points
FROM #sprintDays d

The need to optimize rises from a bad design.My articles[^]

GeneralRe: SQL Help - sum items based on max but also smaller than...? [modified] Pin
GlobX7-Mar-11 12:12
GlobX7-Mar-11 12:12 
GeneralRe: SQL Help - sum items based on max but also smaller than...? Pin
Wendelius7-Mar-11 18:37
mentorWendelius7-Mar-11 18:37 
AnswerRe: SQL Help - sum items based on max but also smaller than...? Pin
GlobX7-Mar-11 13:05
GlobX7-Mar-11 13:05 
Questioncopy data from 1 table to another table Pin
bapu28895-Mar-11 6:07
bapu28895-Mar-11 6:07 
AnswerRe: copy data from 1 table to another table Pin
Mycroft Holmes5-Mar-11 12:07
professionalMycroft Holmes5-Mar-11 12:07 
AnswerRe: copy data from 1 table to another table Pin
PIEBALDconsult5-Mar-11 14:48
mvePIEBALDconsult5-Mar-11 14:48 
QuestionRe: copy data from 1 table to another table Pin
bapu28895-Mar-11 19:57
bapu28895-Mar-11 19:57 
QuestionRead only ADO connection still allows writing to database? Pin
PJ Arends4-Mar-11 17:54
professionalPJ Arends4-Mar-11 17:54 
AnswerRe: Read only ADO connection still allows writing to database? Pin
Mycroft Holmes4-Mar-11 19:59
professionalMycroft Holmes4-Mar-11 19:59 
GeneralRe: Read only ADO connection still allows writing to database? Pin
PJ Arends6-Mar-11 10:26
professionalPJ Arends6-Mar-11 10:26 
GeneralRe: Read only ADO connection still allows writing to database? Pin
Mycroft Holmes6-Mar-11 11:42
professionalMycroft Holmes6-Mar-11 11:42 
GeneralRe: Read only ADO connection still allows writing to database? Pin
PJ Arends6-Mar-11 17:51
professionalPJ Arends6-Mar-11 17:51 
GeneralRe: Read only ADO connection still allows writing to database? Pin
Mycroft Holmes6-Mar-11 18:01
professionalMycroft Holmes6-Mar-11 18:01 
QuestionUpdating Columns Pin
whatsa3-Mar-11 14:14
whatsa3-Mar-11 14:14 
AnswerRe: Updating Columns Pin
Luc Pattyn3-Mar-11 14:24
sitebuilderLuc Pattyn3-Mar-11 14:24 
GeneralRe: Updating Columns Pin
whatsa17-Mar-11 10:07
whatsa17-Mar-11 10:07 
AnswerRe: Updating Columns Pin
jschell3-Mar-11 15:27
jschell3-Mar-11 15:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.