Microsoft
Software
Hardware
Network
Question : Sql Question
I have this table:
points | type | name
100 | 1 | John
100 | 1 | micke
100 | 3 | johen
100 | 2 | Peter
100 | 3 | Micke
I whant this reults:
Name | pointsTYP1 | Points TYP2 | points TYP3
John | 500 | 555 | 1100
Micke | 545 | 5151 | 5150
Who can i do this with 1 sql?
Answer : Sql Question
Or you could do:
SELECT name, SUM(CASE WHEN type = 1 THEN points ELSE 0 END) as pointsType1, SUM(CASE WHEN type = 2 THEN points ELSE 0 END) as pointsType2, SUM(CASE WHEN type = 3 THEN points ELSE 0 END) as pointsType3 FROM table
GROUP BY name
Random Solutions
Probl;em with Totals in Subform/Main From in Access 2007
global variable username passthrough sql to generate a users work orders.
Email recipients in BCC field can see eachother
Exchange 2007 SP2 install fails on Unified Messaging
There is not enogugh memory to complete the automation object operation on the chart object
Can I add additional SSL cerificate for single domain?
How Can I Change Account Locked Out message
Fox 9 Microsoft Visual Fox Pro Support Library Error
MS Access Subform Fixed Column Width
How can I completely re-install USB whilst in recovery console?