![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi All, I'm looking to concatenate multiple values for a single column and am wondering if this is possible. select concat(a1), a2, a3, a4 from A group by a2,a3,a4 The above will select multiple values of a1. These could range between one value to 10 or 12. I'd like to have them all concatenated, while retaining distinct values of a2,a3 and a4. Is this possible? TIA, Sashi |
#3
| |||
| |||
|
|
"Sashi" <small... (AT) gmail (DOT) com> a écrit dans le message de news: c18a563e-94cf-4f35-8c96-df4d40105... (AT) j19g2000vbp (DOT) googlegroups.com... | Hi All, I'm looking to concatenate multiple values for a single column | and am wondering if this is possible. | | select concat(a1), a2, a3, a4 | from A | group by a2,a3,a4 | | The above will select multiple values of a1. These could range between | one value to 10 or 12. | I'd like to have them all concatenated, while retaining distinct | values of a2,a3 and a4. | | Is this possible? | | TIA, | Sashi Search for stragg on AskTom site. Regards Michel |
#4
| |||
| |||
|
|
On Sep 14, 2:51*pm, "Michel Cadot" <micadot{at}altern{dot}org> wrote: "Sashi" <small... (AT) gmail (DOT) com> a écrit dans le message de news: c18a563e-94cf-4f35-8c96-df4d40105... (AT) j19g2000vbp (DOT) googlegroups.com... | Hi All, I'm looking to concatenate multiple values for a single column | and am wondering if this is possible. | | select concat(a1), a2, a3, a4 | from A | group by a2,a3,a4 | | The above will select multiple values of a1. These could range between | one value to 10 or 12. | I'd like to have them all concatenated, while retaining distinct | values of a2,a3 and a4. | | Is this possible? | | TIA, | Sashi Search for stragg on AskTom site. Regards Michel Thanks, Michel. I've discovered that 10g offers a new function called collect which seems to work similar to the stragg. Here' the link:http://www.oracle-developer.net/display.php?id=306 Regards, Sashi- Hide quoted text - - Show quoted text - |
#5
| |||
| |||
|
|
"Sashi" <small... (AT) gmail (DOT) com> a écrit dans le message de news: c18a563e-94cf-4f35-8c96-df4d40105... (AT) j19g2000vbp (DOT) googlegroups.com... | Hi All, I'm looking to concatenate multiple values for a single column | and am wondering if this is possible. | | select concat(a1), a2, a3, a4 | from A | group by a2,a3,a4 | | The above will select multiple values of a1. These could range between | one value to 10 or 12. | I'd like to have them all concatenated, while retaining distinct | values of a2,a3 and a4. | | Is this possible? | | TIA, | Sashi Search for stragg on AskTom site. Regards Michel |
#6
| |||
| |||
|
|
It does not concatenate the values, it returns a collection of values. SQL*Plus displays it as it seems the concatenation of the values but it is not. If it makes what you want, good, but it is not what you asked. Regards Michel |
![]() |
| Thread Tools | |
| Display Modes | |
| |