excel - I don't know how to do the pivot in sql -


hi i'm having trouble pivot, i'm doing internship , asked me produce report in excel. i've produced excel reports based on pl/sql can't manage right code diplay. i'm not sure if pivot best idea have in mind.

this how excel should like

                   b        c      d       e                         9:00     9:30   10:00   10:30  valleyfield          1        2       2      2  st-thomas            2        3       1      4 zalau                0        4       5      1 

and have sql code

nb_embarquement   heure        zone     2             9:00       valleyfield       3             10:30      valleyfield       4             9:30       st-thomas     1             11:00      zalau  

there more 4 results visual

this sql im using :

 select c.nb_embarquement, th.heure || ':' || th.minutes heure, z.nom_zone  txb_demandes d, txb_trajets_heures th, txb_courses c, txb_zones z   d.id_course = c.id_course   , d.id_trajet_heure = th.id_trajet_heure   , d.id_demande_parent null   , c.id_zone = z.id_zone 


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -