Thursday, March 29, 2012

Create table using data from another table

Hi,
How could I create a new table dynamically where columns names are data
from another table?
Example:
I have a table "Table1" with one column "T1Col"
The column contains following data:
"Row1"
"Row2"
"Row3"
Now I would like to "read" data from Table1 and create a new table
Table2 which will contain columns "Row1", "Row2" and
"Row3".
Any help will be appreciated.
Thank you in advance.Google for "transpose" or "cross-tab" or search this newsgroup.
ML
http://milambda.blogspot.com/sql

No comments:

Post a Comment