J
JensB
Hi Ng
I got a table containing headers for quotations, with the columns QuoteDate,
QuoteNo, TrackNo, TotalQuoteAmount and other data about the customer.
I want to get the total value quoted for all customers for a given period of
time for production planning purpose.
As we all know, customers change their mind, therefore the table contain
revised quotes.
To avoid more values for the same case are added to the total and giving a
false picture,
I am only interested to get the latest of the revised quotes in my query.
The trackNo column contain a the numeric value of the quote,
this means, if we have the quotes 1000, 1000-a , 1000b and 1000c then the
trackNo will be 1000 for all 4 rows.
If I then use SELECT DISTINCT TrackNo I get correct number of rows, but my
question is:
How do I for sure get the latest (newest) quote 1000c?
I tried with MAX(QuoteDate), but get an error.
any help would be great
Jens
I got a table containing headers for quotations, with the columns QuoteDate,
QuoteNo, TrackNo, TotalQuoteAmount and other data about the customer.
I want to get the total value quoted for all customers for a given period of
time for production planning purpose.
As we all know, customers change their mind, therefore the table contain
revised quotes.
To avoid more values for the same case are added to the total and giving a
false picture,
I am only interested to get the latest of the revised quotes in my query.
The trackNo column contain a the numeric value of the quote,
this means, if we have the quotes 1000, 1000-a , 1000b and 1000c then the
trackNo will be 1000 for all 4 rows.
If I then use SELECT DISTINCT TrackNo I get correct number of rows, but my
question is:
How do I for sure get the latest (newest) quote 1000c?
I tried with MAX(QuoteDate), but get an error.
any help would be great
Jens