[GIS] How to select distinct values from a column in Mapbasic

mapbasicmapinfosql

I have a table in a mapinfo .tab file. Is there any way to select distinct values from the column?

I tried :-

SELECT distinct (some_column) from table_name into temp_table

But this query would select all values. I wanted to select only distinct value from that column. Is there any way to achieve it?

Best Answer

MapInfo Pro does not support the Distinct keywork, unfortunately. However you can get to the same result just be grouping your result by the column

Select some_column from table_name into temp_table Group By some_column