Click here to Skip to main content
15,899,679 members
Home / Discussions / Database
   

Database

 
Questionnot able to connect with sql server2000 Pin
nauty7-Feb-06 9:12
nauty7-Feb-06 9:12 
AnswerRe: not able to connect with sql server2000 Pin
Mekong River7-Feb-06 15:20
Mekong River7-Feb-06 15:20 
GeneralRe: not able to connect with sql server2000 Pin
Dave Kreskowiak7-Feb-06 16:05
mveDave Kreskowiak7-Feb-06 16:05 
GeneralRe: not able to connect with sql server2000 Pin
Mekong River7-Feb-06 16:15
Mekong River7-Feb-06 16:15 
GeneralRe: not able to connect with sql server2000 Pin
Dave Kreskowiak7-Feb-06 16:24
mveDave Kreskowiak7-Feb-06 16:24 
GeneralRe: not able to connect with sql server2000 Pin
Mekong River7-Feb-06 16:28
Mekong River7-Feb-06 16:28 
Questiondate format problem with asp & mssql. Help! Pin
dansoft7-Feb-06 7:38
dansoft7-Feb-06 7:38 
AnswerRe: date format problem with asp & mssql. Help! Pin
Dave Kreskowiak7-Feb-06 8:01
mveDave Kreskowiak7-Feb-06 8:01 
QuestionRe: date format problem with asp & mssql. Help! Pin
dansoft7-Feb-06 15:48
dansoft7-Feb-06 15:48 
AnswerRe: date format problem with asp & mssql. Help! Pin
Dave Kreskowiak7-Feb-06 16:11
mveDave Kreskowiak7-Feb-06 16:11 
AnswerRe: date format problem with asp & mssql. Help! Pin
dansoft7-Feb-06 17:54
dansoft7-Feb-06 17:54 
GeneralRe: date format problem with asp & mssql. Help! Pin
Dave Kreskowiak8-Feb-06 2:08
mveDave Kreskowiak8-Feb-06 2:08 
GeneralRe: date format problem with asp & mssql. Help! Pin
dansoft8-Feb-06 2:53
dansoft8-Feb-06 2:53 
GeneralRe: date format problem with asp & mssql. Help! Pin
Dave Kreskowiak8-Feb-06 11:58
mveDave Kreskowiak8-Feb-06 11:58 
GeneralRe: date format problem with asp & mssql. Help! Pin
dansoft9-Feb-06 7:37
dansoft9-Feb-06 7:37 
GeneralRe: date format problem with asp & mssql. Help! Pin
Dave Kreskowiak9-Feb-06 11:10
mveDave Kreskowiak9-Feb-06 11:10 
GeneralRe: date format problem with asp & mssql. Help! Pin
dansoft9-Feb-06 14:37
dansoft9-Feb-06 14:37 
Questioninserting images Pin
Net-Programer-and-developer7-Feb-06 5:30
Net-Programer-and-developer7-Feb-06 5:30 
AnswerRe: inserting images Pin
Dave Kreskowiak7-Feb-06 7:59
mveDave Kreskowiak7-Feb-06 7:59 
Questionsql server credentials Pin
Dimitris Iliopoulos7-Feb-06 4:47
Dimitris Iliopoulos7-Feb-06 4:47 
AnswerRe: sql server credentials Pin
Mike Dimmick7-Feb-06 5:45
Mike Dimmick7-Feb-06 5:45 
QuestionCumalative Sum and Supply/Demand Delay Pin
T-Smooth7-Feb-06 4:41
T-Smooth7-Feb-06 4:41 
Hi,

I have a table consisting of the following columns of relevance:

Day - Integer ranging from 1-9
Demand_Qty - Double value specifying the demand for that particular day.
Demand_Filled - Doulbe value specifying how much of the item was recieved that day.

What I need to find out is how many days it takes before each demand is filled. For example:

Day Demand_Qty Demand_Filled Days_to_Fill
1 10 0 2
2 10 0 2
3 20 10 1
4 5 30 1
5 10 10 -1

The first 3 columns are provided and the Days_to_Fill column is what I need to calculate. A -1 in the Days_To_Fill means the demand was never met. As you can see, the Demand for Day 1 is 10, which is not filled until Day 3. If further clarification is needed, pls inquire.

I'm not sure exactly where to begin so any tips/ideas/solutions would be greatly appreciated. One thing that I believe could get me closer to a solution would be acquiring a cumalative sum of Demand_Qty and Demand_Filled for each day, but I don't know how to do this in SQL... anyone know how? What I mean is a sum that would look like this based on the above sample:

Day SumDemand SumFilled
1 10 0
2 20 0
3 40 10
4 45 40
5 55 50

Thank you for any help in advance, hoping I can get a solution figured out soon for my Project Manager.

-Tom
QuestionIf statement in select clause... Help! Pin
awisey7-Feb-06 4:25
awisey7-Feb-06 4:25 
AnswerRe: If statement in select clause... Help! Pin
Mike Ellison7-Feb-06 5:56
Mike Ellison7-Feb-06 5:56 
AnswerRe: If statement in select clause... Help! Pin
Michael Potter7-Feb-06 5:58
Michael Potter7-Feb-06 5:58 

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.