hindersaliva
asked on
SQL - populating a grid with text data
I have 2 tables. tblGrid and tblPartsMemberPlays. (See attached)
I'm trying to populate tblGrid with data from tblPartsMemberPlays in a 'cross tab' way.
I tried
Where I hoped to repeat this for as many 'Parts' there is. ie. Vocal1, Vocal2, Vocal3...
I get this error
1. what am I doing wrong?
2. is there a better SQL statement for achieving my goal?
Thanks!
I'm trying to populate tblGrid with data from tblPartsMemberPlays in a 'cross tab' way.
I tried
UPDATE tblGrid
SET tblGrid.Vocal1 = tblPartsMemberPlays.Member
WHERE tblGrid.TheID = tblPartsMemberPlays.TheID AND tblPartsMemberPlays.Part = 'Vocal1'
Where I hoped to repeat this for as many 'Parts' there is. ie. Vocal1, Vocal2, Vocal3...
I get this error
1. what am I doing wrong?
2. is there a better SQL statement for achieving my goal?
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Happy to assist.
ASKER
Thanks Savic!