Discussion in 'SQL PL/SQL' started by hyilmaz, Dec 8, 2012.
hi, this instance multiple tables (for example, 3 tables) how-to.
What that attached .xls file related to?? Couldn't understand what are they..
Please explain the things in clear steps. There is no relation between excel sheet and what you have shown in screenshots and title of this post.
Note:- Please make sure that before posting everything should be in clear manner. By that everyone can understand.
I'm running a SQL query. This query data from a table'm having 3 different. Returns 18 rows results. Desired, to conclude this 18-row side by side.
how can i get sql query result in horizontal way.
example sql query
results from our database
the desired result, the horizontal
also tried to explain with an example.
On how many it was possible to guess according to three enclosed pictures and the excel file, you need to use PIVOT, if the oracle 11g version.
link to documentation:
for oracle of prior 11g versions, at creation of a script it is possible to use group by and the decode function if the quantity of lines is known.
link to a forum:
FROM (SELECT job,
SUM (decode (deptno, 10, sal)) DEPT10,
SUM (decode (deptno, 20, sal)) DEPT20,
SUM (decode (deptno, 30, sal)) DEPT30,
SUM (decode (deptno, 40, sal)) DEPT40
GROUP BY job)
ORDER BY 1;
You can show the text of sql of query?