Hi

I'm a newbie in SQL and SQLObjects. I would like to thank you in advance for your help.

I would like to make a database of GPS localized point of interest.
Each element has the X and Y position.

I would like to select the N closest objects from a point A (AX,AY), sorted from close to far.

Googling a bit, I saw that the 'order by' can take a function. But I don't know if it can take a complex function:

is this possible in SQL?:
ORDER BY (X-10)*(X-10)+(Y-20)*(Y-20)

And in SqlObject?

Thanks


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to