Un-normalize a table
===

I have a normalized table (table a) and a non-normalized table (table b), like this:

![enter image description here][1]



  [1]: http://i.stack.imgur.com/51orV.png

Basically, for each row in table a for the same student ID, I want to read all the parents with the same studentId and put the data into one row in table B.

So if I have 3 rows in table A, then there would be one row in table B with 3 of the 4 parent fields filled in. Any help for an SQl query for this would be appreciated.