General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Hi Tore
First of all pls accept my Thanks for ur Reply.
I m getting wrong result.. with that
Basically there are three tables..
Like
First is OPmrp(OpStock)
Entno(itemid)-- opQty-------Batch------ Date--------------Stopdelv(Logical)
1------------------- 10.00------- 001A------01.01.2010------.F.
1------------------ 15.00------- 002A------01.01.2010------.T.
3----------------- 20.00------- 001B----- 01.01.2010------ .T.
Second is PDD (Production)
Entno(itemid)-- opQty-------Batch------ Date--------------Stopdelv(Logical
1-------------------10.00 -------003A------05.01.2010------.F.
1-------------------15.00 -------004A------07.01.2010------.T.
5-------------------20.00-------001B------01.01.2010------.F.
6-------------------20.00-------002B------01.01.2010------.F.
Third is SLD (Sales)
Entno(itemid)--opQty-------Batch---Batchdate
1-------------------5.00--------001A----01.01.2010
1-------------------5.00--------002A----01.01.2010
1-------------------2.00--------002A----01.01.2010
3-------------------2.00--------001B----01.01.2010
3-------------------2.00--------001B----01.01.2010
3-------------------4.00--------001B----01.01.2010
1-------------------9.00--------003A----05.01.2010
1-------------------2.00--------004A----07.01.2010
1-------------------3.00--------004A----07.01.2010
1-------------------3.00--------004A----07.01.2010
1-------------------2.00--------004A----07.01.2010
5-------------------4.00--------001B----01.01.2010
6-------------------3.00--------002B----01.01.2010
Now Sql Should Show Following Result Where StopDelv is True in OPMRP or PDD
Entno(itemid)--Batch---Date----------------opQty------Production---------------Sales----- clStock------Stopdelv
1------------------002A----01.01.2010---------15.00---------00.00------------------ 7------------ 8.00------------ .T.
3------------------001B----01.01.2010---------20.00---------00.00------------------ 8-----------12.00------------ .T.
1------------------004A----07.01.2010---------00.00---------15.00------------------ 10-----------5.00-------------..T.
Regards
Rajesh
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only