Help with Oracle SQL query syntax

-- I have table1 that has one primary key (PK1)
-- Another table called table2 with two primary keys (PK1, LINE#). This table has another column called COL1 that will have values VAL1, VAL2, VAL3 etc. corresponding to LINE# values of 1, 2, 3 and so on

I would like to write a SQL query that will return the following output in one row

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

FYI: images aren't the best way to provide us sample data and results. It is hard for us to create test cases.

If you have a MAXIMUM of 10 possible orders try something like the code below.

If you have more just change the 10 in "connect by level <= 10" the the maximum and add the appropriate number of new columns:
max(case when t2.pk2 = 10 then order_num end) order10,
...
max(case when t2.pk2 = N then order_num end) orderN

No big deal, not complaining or anything, just wanted to share another (slightly simpler?) way to solve the problem. Make sure you didn't accidentally mis-copy the query of change anything after copying it. Can you post the exact query you ran there?

No matter what, glad you have something useful from other posts, I just knew I had tested it before posting so was curious if there was a problem. I'm a curious sort :-)

Sure Bill. I will give this query another try and will let you know.
FYI, I need fixed number of columns (only three order numbers) so # of columns is not dynamic. Can you modify your query to reflect that and let me know?

If you want individual columns then my approach is not preferred, it's useful for combining values from different rows into a single column. I took that approach because your original question said the following, although it now appears I may have taken that too literally...

I would like to write a SQL query that will return the following output in one row
PK1,VAL1,VAL2,VAL3...VALN

Working with Network Access Control Lists in Oracle 11g (part 2)
Part 1: http://www.e-e.com/A_8429.html
Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access. For many…

Configuring and using Oracle Database Gateway for ODBC
Introduction
First, a brief summary of what a Database Gateway is. A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…

This video shows how to copy a database user from one database to another user DBMS_METADATA. It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.