(sa******@hotmail.com) writes:
If someone can give me an idea to do this in Ms-SqlServer:
Create a order, this order I have to asign different location
for each process of the order.
Each location has a lasting time asigned in Hours.
I have to determine the DateTime of begining and ending for
each process, the order has the begining datetime.
How can I determine the process DateTime(Begin,End)?
I have to consider the WorkTime and Free-Days (Saturday, Sunday..).
So when I create a new order the DateTime Asigned can not be used
by another order still opened.
I'm not really sure what you are asking for. Do you want help with a
query, or is it the design more in general? If you want help with a
query, including a table definition, sample data and desired output
would be helpful.
One thing I can say, to handle work-time, you need some sort of a
calendar table, since you probably also want to include other
days off than just Saturday and Sunday, for instance New Year's Day.
--
Erland Sommarskog, SQL Server MVP,
es****@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp