>It is ANSI SQL and you can use it as is except that there is no CONVERT function in VFP, but we have CAST function. So, you can even use it as is by replacing CONVERT with CAST and adding GROUP BY.
>
>However, using DTOS is simpler.
>
>In SQL Server, it's also simple to use CONVERT with the specific code rather than this complex code you have.
What would be the syntax to have it simpler?