No you can't do this as a select distinct statement. As with all other sql statements they work on rows of data...It is a common mistake...The easiest way to do this is have a select distinct of the fields you wish i.e. this will get the distinct rows of data you wish...For the other fields you...
First of all I agree that you require an index on id...The way I would tackle it is this :
1. Do a select distinct of id into a temporary table which has no index...without the index will speed up the insert and you will be doing a sequential loop through this temp table. columns in the temp...
How to I prevent a user from closing a window/form. I want the user to instead press a button on the form rather than have them being able to close the window. Any ideas as I've looked at the properties for a window and can't seem to work it out....
There are many ways but here is one :
select cust, max(mnth)
from gtntest
group by cust
The above will give you the customer and the month. You can open record set for each row returned and do another select to get the price based on the customer and month in each record i.e.
select price...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.