views:

271

answers:

4

How to aggregate string( concatenate) with Oracle 10g SQL?

+1  A: 

Oddly enough, it's the "||" operator:

field1 || field2
Mike Mooney
+1  A: 

You could try the collect function:

http://www.oracle-developer.net/display.php?id=306

Some other tricks are here:

http://www.oracle-base.com/articles/misc/StringAggregationTechniques.php

...If you actually mean concatenation instead of aggregation then take everyone else's advice and use the || operator between the two strings:

select 'abc'||'def' from dual;
FrustratedWithFormsDesigner
A: 

You could use the || operator. Ex: 'First' || 'Second'

Also the function CONCAT(var1, var2) allows you to concatenate two VARCHAR2 characters. Ex: CONCAT('First', 'Second')

alex
A: 

Concatenate: CONCAT or ||

Aggregate: COLLECT

Joe Gauterin