I have this query
select t1.*,t2.opr,t2.resource_id,t2.PrevOp,t2.NextOp
from
(select w.type, w.base_id, w.lot_id, w.split_id,w.sub_id, w.desired_want_date,w.user_7
from work_order w where w.type = 'w' and
(w.status = 'F' or w.status = 'R' or w.status = 'U')
and w.base_id like 'AG%')t1
join...
Yes, I picked up on that,I found the row_number function and am using it to sequence the ops. Thanks again for your help. I still have a lot of work to do but at least I have the necessary info.[bigsmile]
Yes, that's what I was looking for, now I'll just work in my date calculations and work to keep the order of operations. Thank you so much, I would never have come up with the solution.
[2thumbsup]
I have SQL 2005. I hope you can come up with something.
I have to call it a day. I'll check in the morning. Thanks for staying with this. I've been trying to come up with a solution for days.
I will keep that in another table.
See 1st post Resources table. I shortened it for posting purposes.
_____________________
Resources
_____________________
Resource #ops Days
soft 1 2
soft 2 4
soft 3 10
soft 4 10
vendor 1 7
vendor 2...
I'm sorry this is so confusing[ponder],I'll try again.
The problem is that there is a seq. of ops
Ops (I'm leaving out the #s)
_____________
soft
soft 2 consecutive soft ops = 4 days
vendor 1 vendor op = 7 days
soft
soft
soft 3 consecutive soft ops = 10...
Boris,
I think I may have misled you with my example.
drlex interpreted it better - he wrote--
"the time taken on op.s is dependent on the sequence, so whilst one soft op. takes 2 days, three consecutive ones take 10 days, rather than 3 x 2 days.
Thus calculating the overall time needs to...
The resource table always looks the same, the first table will change, meaning the # of ops,the order and resources needed will change. (The table is the list of operations in a workorder.) I will have an end date for the workorder.
I am going to try your solution. Counting the # of consecutive...
What I think needs to be done is to sequence through the operations, adding 1 to a counter until the resource changes. This gives the # of ops done at the resource, then join to a table that gives the # of days at the maximum. Then either total up the # of days and subtract to find the start...
I need help analyzing if this can be done.
I have a table of ops, each having a resource,
each resource takes so many days to perform.
I have a resource table that shows how many days it takes to complete 1 op, 2 ops, 3 ops etc. of each resource.
I have a completion date for the ops.
I want to...
The data comes in like
----Doc_id----------------
W~WO1~A~0~0~100
W~WO2~b~1~0~110
I want it to be
Type WO Lot split sub opr
W WO1 A 0 0 100
W W02 b 1 0 110
I will check out the post too.
I have a view
CREATE view
[dbo].[AGV_WO_OPR_AND_UDFS]
as
SELECT [PROGRAM_ID] as id
,[DOCUMENT_ID] as doc
,case when [id] = 'UDF-0000086' then [string_val] else null end as Machine
,case when [id] = 'UDF-0000087' then [string_val] else null end as Prog_Ready
,case when [id] =...
I have one more question, you said you tested the return datatype of [Scrap%], how do you do that? I was wondering what the datatype was myself but didn't know how to deterimine it. Thanks again. Here's another star.[bigsmile]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.