473,513 Members | 2,397 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how i can select the latest order for a customer in oracle forms

10 New Member
how i can select the latest order for a customer in oracle forms and save this order as a new order whith new date.
i use GROUP BY customer_ID and MAX(order_date) but i get another customer_ID and order who share the 'order_date' och inserted before a pressing issue.

the Trigger as
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;
Oct 14 '08 #1
3 1965
debasisdas
8,127 Recognized Expert Expert
how can that return another customer details since you are passing the customer id in the query.
Oct 14 '08 #2
ghssal
10 New Member
how can that return another customer details since you are passing the customer id in the query.
This is what happened , i believed 'GROUP BY(customer_ID ) select the first one in the group MAX(ORDER_DATE).

The idea are when you want to insert a new order, you will enter by the customer_ID and you will get the latest order för this customer and save the new order with new order_date.
Oct 14 '08 #3
amitpatel66
2,367 Recognized Expert Top Contributor
So when you create a n ew order, the order date will be defaulted to SYSDATE right?
Oct 18 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
27446
by: mlke | last post by:
I would like to select the top 10 record from a table? How can I do it? In MS SQL, it's easy using select top 10 from table1. But in oracle database, I can't use top, anyone have any suggestions?...
12
6510
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the...
6
1899
by: BlueDragon | last post by:
Grrr! I'm trying to run a script: print 'Declaring cursor' declare cInv cursor forward_only static for select distinct inv.company, inv.contact, inv.address1, inv.city,
6
9311
by: GSteven | last post by:
(as formerly posted to microsoft.public.access.forms with no result) I've created a continuous form which is based on a straightforward table (ex - customers - 100 records). On the form there is...
8
6797
by: kaosyeti | last post by:
i have a (hopefully) small problem. i have created a system where a user enters customer information into a table through a form. this table has no primary key. there are 9 fields on the form to...
19
8342
by: Steve | last post by:
ASP error number 13 - Type mismatch with SELECT...FOR UPDATE statement I got ASP error number 13 when I use the SELECT...FOR UPDATE statement as below. However, if I use SELECT statement without...
6
2161
by: tuxedo | last post by:
I have a fixed html structure, where only one form and a simple select menu will exist on an html page, as follows: <form action="order" method="POST"> <select name="dinner"> <option...
1
1152
by: Wan | last post by:
Hi, I have a test project which contains two simple forms - 1st form contains datagrid and couple of buttons. First button to populate the grid with Northwind.Customers records and show 3...
5
12967
by: eko99312 | last post by:
Pardon me if this question already been asked before. I tried to sort a query to meet my desire. Here is the example: Date Customer Supplier Price 31-Oct-09 Charlie Australia $ 100...
0
7269
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7394
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7559
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7542
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5701
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5100
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
1611
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
811
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
470
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.