Link to home
Start Free TrialLog in
Avatar of hindersaliva
hindersalivaFlag for United Kingdom of Great Britain and Northern Ireland

asked on

SQL - populating a grid with text data

I have 2 tables. tblGrid and tblPartsMemberPlays. (See attached)
User generated imageUser generated imageI'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'

Open in new window


Where I hoped to repeat this for as many 'Parts' there is. ie. Vocal1, Vocal2, Vocal3...

I get this error
User generated image
1. what am I doing wrong?
2. is there a better SQL statement for achieving my goal?

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of savic7uk
savic7uk
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hindersaliva

ASKER

Of course! Silly me!
Thanks Savic!
Happy to assist.