Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to insert comma (,) into query

Dino2dyMar 21 2011 — edited Mar 22 2011
Hello all, I use Jdeveloper 11g R1 and have the following problem

I have a simple select query inside my view
SELECT 
    Opcine.SIFRA_OPCINA, 
    Opcine.NAZIV, 
    Opcine.SIFRA_KANTON, 
    Opcine.RACUN_JAVNIH_PRIHODA, 
    Kantoni.NAZIV NazivKantona, 
    Entitet.NAZIV NazivEntiteta 
FROM 
    OPCINE Opcine, 
    KANTONI Kantoni, 
    ENTITET Entitet
WHERE 
    Opcine.SIFRA_KANTON = Kantoni.SIFRA_KANTON AND Kantoni.SIFRA_ENTITET = Entitet.SIFRA_ENTITET
What I want is to just add a comma (,) for the results NAZIV, (It's kinda like County, City, State so all three are name).

So in the results I want it to be

Washington, Virginia, USA

Instead of

Washington Virginia USA

I tried the LISTAGG and WM_CONCAT functions but without using group by (as I don't want that) and it didn't work.

I also tried this ||', '|| but that also did not work, this is really what I want to use but without going all PL/SQL on it (wanna keep it simple).

Hope u guys can help
This post has been answered by 728374 on Mar 21 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 19 2011
Added on Mar 21 2011
6 comments
3,435 views