hello, I'm kinda newbie in databases.
I have a table like that:
DB is MSSQL 2003
Name is varchar
Fruit is int (i used the name just to avoid mess with numbers)
the number and the type of the fruit is fixed (in real case are 1,2,3 and 4)
Qty is int
+++++++++++++++++++++
+ Name + Fruit + Qty +
+++++++++++++++++++++
+++++++++++++++++++++
+ Paul + Apple + 3 +
+ Paul + Banana + 2 +
+ Mark + Apple + 17 +
+ Paul + Pine + 1 +
+ Mark + Pine + 3 +
+++++++++++++++++++++
Id like to have this output but I'm a bit underprepared to do that...
+++++++++++++++++++++++++
Name + Apple + Banana + Pine +
+++++++++++++++++++++++++
Paul + 3 + 2 + 1 +
Mark + 17 + 0 + 3 +
+++++++++++++++++++++++++