Converting some fields to columns

A

aine_canby

Hi,

I have the following table -

Test Tester Result
Test1 Brian Pass
Test1 John Pass
Test21 Brian Fail
Test23 John Pass
Test77 John Fail
Test111 Aine Pass
Test111 John Pass

what query would i need to achieve the following -

Test Aine Brian John
Test1 Null Pass Pass
Test21 Null Fail Null
Test23 Null Null Pass
Test77 Null Null Fail
Test111 Pass Null Pass

Thanks,

Aine
 
G

Gary Walter

<aine_ wrote:...
Hi,

I have the following table -

Test Tester Result
Test1 Brian Pass
Test1 John Pass
Test21 Brian Fail
Test23 John Pass
Test77 John Fail
Test111 Aine Pass
Test111 John Pass

what query would i need to achieve the following -

Test Aine Brian John
Test1 Null Pass Pass
Test21 Null Fail Null
Test23 Null Null Pass
Test77 Null Null Fail
Test111 Pass Null Pass
Hi Aine,

Looks like a good candidate for a crosstab query...

If name of your table was "tblTest" then try...

TRANSFORM FIRST(NZ([Result]),"Null"))
SELECT
Test
FROM
tblTest
GROUP BY
Test
PIVOT Tester;

good luck,

gary
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top