how to pivot in SQL (1 Viewer)

Misiek

Registered User.
Local time
Today, 11:18
Joined
Sep 10, 2014
Messages
249
Hello,

I'm attempting to learn MySql, first issue I found, It doesn't do TRANSFORM like access,

Here's my old SQL from access, I need to change it into standard SQL:
Code:
TRANSFORM nz(count(*),0) AS FoundMonth
SELECT month(dDateFound) AS [MONTH], Count(*) AS [Found]
FROM Q_Defects INNER JOIN T_Settings
WHERE dDateFound >= FYDateFROM AND dDateFound <= FYDateTO
GROUP BY Month(dDateFound)
PIVOT month([dDateFound])
IN (1,2,3,4,5,6,7,8,9,10,11,12);
Can anyone be so kind and walk me through this please.
 

Misiek

Registered User.
Local time
Today, 11:18
Joined
Sep 10, 2014
Messages
249
thanks, sorted.
 

Users who are viewing this thread

Top Bottom