willdevelope
Programmer
Product
Warehouse_ID product_enter_dt
1 2008-07-01
1 2007-07-01
2 2008-10-01
Inventory
Warehouse_ID Inventory_Enter_dt
1 2002-01-01
1 2009-05-01
2 2007-11-30
Store
Warehouse_ID Store_Enter_Dt
1 2005-04-01
1 2008-07-01
2 2005-11-30
I would like to create a stored procedure that return the latest date of all three tables by passing the global_Id as the parameter
For example , if I pass Warehouse_Id = 1 in a stored Procedure , it should return 2009-05-01
Warehouse_ID product_enter_dt
1 2008-07-01
1 2007-07-01
2 2008-10-01
Inventory
Warehouse_ID Inventory_Enter_dt
1 2002-01-01
1 2009-05-01
2 2007-11-30
Store
Warehouse_ID Store_Enter_Dt
1 2005-04-01
1 2008-07-01
2 2005-11-30
I would like to create a stored procedure that return the latest date of all three tables by passing the global_Id as the parameter
For example , if I pass Warehouse_Id = 1 in a stored Procedure , it should return 2009-05-01