I think it would be more to the point to explain _why_ you are trying to
do this data transposition. It may be that you can achieve the effect
you want without creating the second table, or that it points to a more
fundamental issue with the design of the database schema. Solving this
would probably be better than just providing you with a mechanism to
achieve this change.
Matthew
singh wrote:
> Actually my scenario is somewhat different.....
>
> E.g. let a table
>
>
> DATE COL1 COL2 COL3 COL4
> ---------------------------------------------
>
> 4-MAR-2006 X Y Z A
> 5-MAR-2006 X1 Y1 Z1 A1
>
> I WANT TO INSERT DATA INTO A TABLE OF THAT STRUCTURE HAVING DATE AS SAME
> COLUMN NAMES IN ONE COLUMN
> AND THE COLUMN VALUE IN OTHER COLUMN ...
>
> LIKE BELOW .....
>
> DATE COL_NAME COL_VAL
> -----------------------------------
> 04-MAR-2006 COL1 X
> 04-MAR-2006 COL2 Y
> 04-MAR-2006 COL3 Z
Oracle LazyDBA home page