All,
I'm querying a table that, for the sake of discussion, has the following data:
MODEL DESC_LINE DESCRIPTION
***** ********* ***********
X 1 Super high-efficiency
X 2 unit with widgets and
X 3 gizmos.
Y 1 Medium-efficiency unit
Y 2 with some gadgets.
As you can see, the model descriptions are broken out by record - this was done for restrictions dictated by an application. However, I'd like to be able to query each model and a "rolled up" or concatenated description within a single field, such that the above data, when queried, would give me two records - one for X, and one for Y, with the full description in one field for each model. There's a varying number of description lines, so I can't anticipate them in advance with a series of subqueried fields in my SELECT. I'm kind of an intermediate end-user of Oracle, so I don't have the ability to write functions in PL/SQL to tackle this - only pass-through queries in Access. Is there an Oracle function of some sort that would do this efficiently? DECODE and CASE don't strike me as viable solutions.
Thanks to all for your assistance.
Shaun
I'm querying a table that, for the sake of discussion, has the following data:
MODEL DESC_LINE DESCRIPTION
***** ********* ***********
X 1 Super high-efficiency
X 2 unit with widgets and
X 3 gizmos.
Y 1 Medium-efficiency unit
Y 2 with some gadgets.
As you can see, the model descriptions are broken out by record - this was done for restrictions dictated by an application. However, I'd like to be able to query each model and a "rolled up" or concatenated description within a single field, such that the above data, when queried, would give me two records - one for X, and one for Y, with the full description in one field for each model. There's a varying number of description lines, so I can't anticipate them in advance with a series of subqueried fields in my SELECT. I'm kind of an intermediate end-user of Oracle, so I don't have the ability to write functions in PL/SQL to tackle this - only pass-through queries in Access. Is there an Oracle function of some sort that would do this efficiently? DECODE and CASE don't strike me as viable solutions.
Thanks to all for your assistance.
Shaun