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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Date help- Kinda urgent

Author  Topic 

dbanewb
Starting Member

2 Posts

Posted - 2004-09-30 : 09:55:51
I have a business process that needs monitored for average times taken for each step of the cycle or for the whole process. I have 3 things to monitor

Original Order Date (ood)-Submit order to Whouse (stw) Case 1
Original Order Date (ood)-Picked up for Delivery (pfd) Case 2
Original Order Date (ood)-Delivery (del) Case 3

Any help is greatly appreciated


DustinMichaels
Constraint Violating Yak Guru

464 Posts

Posted - 2004-09-30 : 10:08:50
You need to give us more information before we can help you. Whats your table structure like give some example data and show what you want please.
Go to Top of Page

dbanewb
Starting Member

2 Posts

Posted - 2004-09-30 : 10:17:42
Ok I get in an order for a customer generating a refnumber in a table called freighdetail. I need to join to an orderheader table to get the date that the order is submitted to the warehouse for handling nd the time when it is picked up for delivery on a truck, then I need to join on a stops table to get the arrival time at the stop. So what I have is:

Table Columns Information
FreightDetail refnumber ordernumber
Orderheader bookdate warehouse submit
Ordreheader startdate warehouse pickup
Stops arrivaldate delivery

What I need is:

Average time from order to warehouse submit
Average time from order to warehouse pickup
Average time from order to delivery

I am thinking this could be worked as a function but that is not required, I need something that will take a customer code,start date,end date, type of average of the 3

Is that enough info?
Go to Top of Page

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2004-09-30 : 13:22:17
Example data and matching expected results would be better
Go to Top of Page
   

- Advertisement -