Skip to content
Advertisement

Tag: oracle12.1

Change Two Rows Into Two Columns

Oracle newbie here just trying to learn something. I have a query that returns two rows per ID: Current Output Instead of two rows, how can I put the two varying values in the B1_CHECKLIST_COMMENT column into two separate columns? Visually, here’s what I’m looking to achieve: Desired Output I’m using Oracle version 12.1. Answer You can use PIVOT: Or

Is the Function in the GROUP BY Clause Necessary?

I’m an Oracle newbie just trying to learn. Are the following two queries equivalent in terms of their results? Query 1 Query 2: No TO_CHAR() in the GROUP BY Clause I’m using Oracle version 12.1. Answer Both queries won’t return the same result… unless customers.date includes only dates with no time part. The DATE type in Oracle includes the date

Advertisement