var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: reverse pivot
I'm looking for a single query to flatten:
1) There is nothing to identify how many managers for a particular dealer_id. (other than the number of rows per dealer)
dealer_id, manager1, manager2, manager3
1,John Smith, Henry James, Alex Doe
2,Mark Markson, Jane Janeson
2) There is a maximum of 3 managers per dealer.
I had in mind something like:
but, because there is nothing to identify the manager number, it throws a wrench in my gears.
max(case etc..) as manger1,
max(case etc..) as manager2,
max(case etc..) as manager3
group by dealer_id;
Last edited by dstachon; 09-24-04 at 18:21.
Reason: spelling mistake