"SELECT DISTINCT", is it possible in Axapta?

Hi, Is it possible? For instance, I wanna know what part numbers are sold in a certain period. For sql, it would be; SELECT DISTINCT ItemId FROM bmssa.CustInvoiceTrans WHERE createdDate >= ‘1-Jan-2004’ AND createdDate <= ‘10-Jan-2004’ Very simple, indeed. BUT I can’t find the exact way to use ‘DISTINCT’ in Axapta [xx(] . I know there are several workarounds on this particular case, but the point is, it’s possible or not? [:)]

Hi, No, it’s not possible. You have to use a workaround. /Peter Karlsson

Hi, It is possible to use DISTINCT statement if you use Connection class and the classes that are extended from it. Regards, Harish Mohanbabu

Ok, I have to try that. (you learn someting new every day) Thanks. /Peter Karlsson

??? What? Connection class? What is that? I don’t have a class name like that. Am I missing something here?

Hi, Please have a look under AOT → System Documentation → Classes … Cheers, Harish Mohanbabu

Found it… Try it… and love it!!! Thanks, Harish and Peter :slight_smile: