HI
I am using ORACLE forms and trying to insert a new order, by enter the customer_ID and i will get the latest order
för this customer and save the new order with new order_date.
I use this Trigger
select .....
from customer_order, (
select customer_ID AS B, MAX(order_date) AS S
from customer_order
GROUP BY customer_ID)
where :customer_ID = B and order_date = S;
IN ORCLE FORMS mode i get another customer_ID and order who share the 'order_date' and inserted before a pressing issue.
When i try in SQL PLUS i get the right customer_ID but i get three record for one order as
customer_ID order_date
------------ ----------
1945 2008/08/12
1945 2008/08/12
1945 2008/08/12
the table
customer_ID order_date
------------ ----------
1945 2007/04/15
1945 2007/05/01
1945 2007/05/04
1945 2008/08/12* This record came in SQL plus tree timesa.
1961 2008/09/09
1961 2007/02/07
1961 2008/08/12
1961 2001/01/01
1961 2004/04/04
1961 2006/06/06
1961 2008/08/12* this what i get in FORMS mode instead for customer_ID=194 5.
1961 2008/08/12
1981 2008/08/12
Can you explian how i solve the problem and get the right order for the right customer_ID.
I am using ORACLE forms and trying to insert a new order, by enter the customer_ID and i will get the latest order
för this customer and save the new order with new order_date.
I use this Trigger
select .....
from customer_order, (
select customer_ID AS B, MAX(order_date) AS S
from customer_order
GROUP BY customer_ID)
where :customer_ID = B and order_date = S;
IN ORCLE FORMS mode i get another customer_ID and order who share the 'order_date' and inserted before a pressing issue.
When i try in SQL PLUS i get the right customer_ID but i get three record for one order as
customer_ID order_date
------------ ----------
1945 2008/08/12
1945 2008/08/12
1945 2008/08/12
the table
customer_ID order_date
------------ ----------
1945 2007/04/15
1945 2007/05/01
1945 2007/05/04
1945 2008/08/12* This record came in SQL plus tree timesa.
1961 2008/09/09
1961 2007/02/07
1961 2008/08/12
1961 2001/01/01
1961 2004/04/04
1961 2006/06/06
1961 2008/08/12* this what i get in FORMS mode instead for customer_ID=194 5.
1961 2008/08/12
1981 2008/08/12
Can you explian how i solve the problem and get the right order for the right customer_ID.
Comment