Hi. Ow. I have a bruised forehead from banging my head against a brick wall and would really appreciate some help here. As long as it's not a suggestion that I shouldn't be trying this!!
I'm working in Access 2000. I have a recordset resulting from a query consisting of three columns:
ItemID (numeric)
Author (text)
Weighting (numeric: 1, 2, 3 etc - unique values)
Some Items have several authors and so several rows in the recordset. Weighting for each author is unique within these rows.
I want to produce a recordset where I have the Item on the same row as (up to three of) its authors, ie column heads like this:
ItemID
Author_1
Author_2
Author_3
The idea is that the author with weighting of 1 goes in Author_1, the author with weighting of 2 goes in Author-2, and so on.
Pivoting (crosstab query) requires me to do some aggregate sort of function, and I can't see how this will help. I have been tinkering with CASE WHEN in SQL view in a query, but don't get anywhere with this since Access responds with error messages (syntax error, operator missing) no matter what syntax I use based on examples taken from the web.
Any ideas? And also, what syntax should you use for CASE WHEN in SQL in Access queries?
Many thanks in advance!
I'm working in Access 2000. I have a recordset resulting from a query consisting of three columns:
ItemID (numeric)
Author (text)
Weighting (numeric: 1, 2, 3 etc - unique values)
Some Items have several authors and so several rows in the recordset. Weighting for each author is unique within these rows.
I want to produce a recordset where I have the Item on the same row as (up to three of) its authors, ie column heads like this:
ItemID
Author_1
Author_2
Author_3
The idea is that the author with weighting of 1 goes in Author_1, the author with weighting of 2 goes in Author-2, and so on.
Pivoting (crosstab query) requires me to do some aggregate sort of function, and I can't see how this will help. I have been tinkering with CASE WHEN in SQL view in a query, but don't get anywhere with this since Access responds with error messages (syntax error, operator missing) no matter what syntax I use based on examples taken from the web.
Any ideas? And also, what syntax should you use for CASE WHEN in SQL in Access queries?
Many thanks in advance!
Comment