Link to home
Start Free TrialLog in
Avatar of Raju Srivatsavaye
Raju SrivatsavayeFlag for United States of America

asked on

group by a string filed (concatenate the string field)

Here is my PL/SQL query

select tbl1.col1, tbl2.col2, tbl3.col3
from tbl1, tbl2, tbl3
where tbl1.col1 = tbl2.col1
and tbl2.col2 = tbl3.col2
group by
tbl1.col1, tbl2.col2, tbl3.col3

here is the output

col1             col2                 col3
1                 123                  val1
1                 123                  val2
2                 234                  val3
2                 234                  val4
2                 234                  val5


i want to see the output as

col1             col2                 col3
1                  123                 val1-val2
2                  234                 val3-val4-val5

in other words i want to concatenate the col3 field

hope i was clear with the description..... please help me out

Thanks
ASKER CERTIFIED SOLUTION
Avatar of arioh
arioh
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Sujith
Sujith
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Forced accept.

Computer101
EE Admin