SQL function MAX

SQL function MAX



I'm trying to do an Advanced SQL query using MAX function and TOP something like these;
SELECT MAX({Table1}.[Id])
FROM {Table1}

and i also tried

SELECT TOP 1 {Table1}.[Id]
FROM {Table1}
ORDER BY {Table1}.[Id] DESC

With no success. > http://img132.imageshack.us/img132/7834/functionmax.png

Is there another way to get the max value using simple query ? Or can anyone give me a tip, what i'm doing wrong...

Hi António,

I believe you need to change the advanced query output structure to a structure with a singe Integer attribute:

Tiago Simões 
Hi Tiago,

Thanks for the tip, problem solved!

Best Regards,