Matrix in PL / SQL

0

I have the following question:

I have three columns: the product selected by the customer in month 1 and the product selected by the customer in month 2 and the number of customers that have this provision and I want to make a matrix of which products are maintained and which have changed, that is as follows:

            Producto 1 Mes 2    Producto 2 Mes 2 Producto 3 Mes 2

Product 1 Month 1 100 2 40 Product 2 Month 1 40 50 100 Product 3 Month 1 90 0 200

So that you do not have to do column by column, is there any way to put SQL in form in the form of a matrix?

Thanks

    
asked by anasavilu 30.10.2017 в 15:39
source

1 answer

0

You can use the concat function that helps you put several columns in one CONCAT (string_value1, string_value2 [ string_valueN]) here is an example

SELECT CONCAT ( 'Happy ', 'Birthday ', 11, '/', '25' ) AS Result;  

This is the link where you can see more information link

    
answered by 30.10.2017 в 19:00