harmmeijer
Programmer
Hello all and thank you for reading my question.
I have 2 float fields lat and long and want to have the rows collapse where both lat and long are the same.
I want to add the lat and long as strings and group them by that
select lat, long, count(lat + ' - ' + long) from ...
group by lat + ' - ' + long
since lat and long are both float the + ' - ' + does not add them as strings, looked at the documentation but could not find any method to add numbers as strings, in sql server I could use something like ctype I think but there seem to be no equivalent in mysql.
Anybody got some tips on how to get the rows grouped only if both lat and long is the same?
Greetings, Harm Meijer
I have 2 float fields lat and long and want to have the rows collapse where both lat and long are the same.
I want to add the lat and long as strings and group them by that
select lat, long, count(lat + ' - ' + long) from ...
group by lat + ' - ' + long
since lat and long are both float the + ' - ' + does not add them as strings, looked at the documentation but could not find any method to add numbers as strings, in sql server I could use something like ctype I think but there seem to be no equivalent in mysql.
Anybody got some tips on how to get the rows grouped only if both lat and long is the same?
Greetings, Harm Meijer