Hi Miles,

Could you explain the same thing with a some sample
data? I does not need to be your data. I think that
what you want to do is this but I am not sure.

Field1 Field2 
A      1
A      1
A      2
A      3
B      1
B      1
B      2
C      2
C      2
C      4
C      4

When you say last do you mean this in ms access?
Select Field1, Last( Field2 ) From MyTable Group by
Field1

Maybe I am not understanding your question, but why
don't you do this?

Select Field1, Max( Field2 ) From MyTable Group by
Field1

Bye and good luck.

P.S. One tip about the volume of emails. Check them
dialy and delete the ones that you are not interested
in. If you are not subscribeb to the mail-list, how
are you going to help other people? :-)



--- Miles Roper <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I've being trying for the last couple of months to
> convert a MS Access to
> Mysql.  I pull out data extract from around 100 +
> queries.  These took about
> 5 months of solid work to develop and are extremely
> complex.  I can convert
> these to mysql, but have one big problem.  There is
> no last function in
> mysql.  I know you can do a descending sort by ID
> and grab the first row to
> get the same thing.  This will not work as I need to
> do it over several
> thousand different groups.  So I need the last row
> per group.
> 
> I have been trying to write a aggregate last UDF
> function in mysql, and
> would consider this to be very simple, however, I
> can't get it to work.  I
> don't really know how to program in C and my
> understanding of it is quite
> vague.  I really need some help to do this from
> someone in the community.  I
> have posted several times in the past and haven't
> heard anything from
> anyone.  I am getting quite frustrated and are about
> ready to flag this
> exercise as a great waste of time.
> 
> I have successful so far got the UDF to compile, and
> installed.  I had to
> recompile mysql for HPUx to get it to support UDFs
> in the first place.  It
> has taken me 50+ hours to export several hundred meg
> of data from access to
> mysql.  I have even written quite a bit of
> code/scripts to get it to the
> point where I can start fixing things.
> 
> So, please, can anyone help me with this.  I don't
> expect someone to do this
> all for me, but just a LITTLE help would be nice.  I
> will quite happily post
> this back into the community if I can get it to
> work.
> 
> I have removed myself off the mailing digest as the
> volume is too high.  If
> you could please email me at
> [EMAIL PROTECTED]
> 
> Yours Gratefully
> 
> Miles
> 
> 
>
---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list
> archive)
> 
> To request this thread, e-mail
> <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try:
> http://lists.mysql.com/php/unsubscribe.php
> 


__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to