davidmckee (8/19/2014)
This is the exact result...except it seems to be in MSSql...the web server runs MySqlI did some research after copying the code into the query and receiving errors...maybe this is MS SQL and not MySql
Does anyone know how to convert this from MSSQL to MySql?
Again assuming this is the difference....
This was the error when I run it
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WITH
cteWinLose AS
( --=== Calculates the wins/losses using a CROSS APPLY to "' at line 1
It would appear that you need to convert the CTEs (the WITHs) to FROMs as "derived tables".
--Jeff Moden
Change is inevitable... Change for the better is not.