table manipulation

  • Thread starter Thread starter hugh
  • Start date Start date
H

hugh

Hi all

my db has a single table, Table1. Table1 is as follows:


AUTHOR;TITLE;PUBLISHER

rows are not unique; i.e. I can have more than 1 row with the same author.

What would be the SQL code to generate a table2 with the following
structure:

AUTHOR;TITLE-PUBLISHER;...;TITLE-PUBLISHER

where every author now has only 1 row and titles and publishers for
author are appended to the right as as may fields as necessary?

thanks!
 
hugh said:
Hi all

my db has a single table, Table1. Table1 is as follows:


AUTHOR;TITLE;PUBLISHER

rows are not unique; i.e. I can have more than 1 row with the same
author.
What would be the SQL code to generate a table2 with the following
structure:

AUTHOR;TITLE-PUBLISHER;...;TITLE-PUBLISHER

where every author now has only 1 row and titles and publishers for
author are appended to the right as as may fields as necessary?

thanks!

A crosstab query might be able to give you that. Making such a table would be a
horrible idea. The result would be a spreadsheet, not a database table.
 
Back
Top