How to insert the comma (,) in a query

Hello all, I use Jdeveloper 11 g R1 and I have the following problem

I have a simple select statement inside my mind
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 add a comma (,) to the COMPANY results, (it's a bit like County, city and State so all three are name).

So in the results, I want it to be

Washington, Virginia, United States

Instead of

Washington, Virginia-UNITED STATES

I tried the LISTAGG and WM_CONCAT functions but without the use of group by (I don't want that) and it did not work.

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

I hope you guys can help

SELECT
CONCAT (Opcine.SIFRA_OPCINA, CONCAT (',', CONCAT (Opcine.NAZIV, CONCAT (', ', Opcine.SIFRA_KANTON))) such AS ADDRESS,)
Opcine.RACUN_JAVNIH_PRIHODA,
Kantoni.NAZIV NazivKantona,
Entitet.NAZIV NazivEntiteta
Of
OPCINE Opcine,
KANTONI Kantoni,
ENTITET Entitet
WHERE
Opcine.SIFRA_KANTON = Kantoni.SIFRA_KANTON AND Kantoni.SIFRA_ENTITET = Entitet.SIFRA_ENTITET

I don't know, if I got your question right, but the above query should give u the output with required result m.

Thank you

Tags: Database

Similar Questions

  • HOW to: Insert the symbol of the degree in text

    An another "How To" question.

    Running PE 13.1 on a Windows PC with WIN 7 64-bit.

    How to insert the symbol of the degree in text - I would like to have something like "temperature + 2 < degree symbol > water C.

    where < degree symbol > is the small circle (triggered).

    I found how to insert copyright (Alt + 0169) & the Tilde (Alt + 126) helped by Wikipedia, but the Windos ciode for the degree symbol is not shown - just the

    Unicode U + 2103 but Alt + 2103 just inserts a '7'.

    HEM

    HEM

    If you have the copyright © symbol to work for you with Alt + 0169, I think Alt + 0176, you should get the degree symbol as in 32 °.

    If please give it a try in the Titler, open Premiere Elements and let us know if it worked for you.

    Thank you.

    RTA

  • How to insert the new line char in sticky c# code?

    Hi all

    I paste the code complete c# on a line of string as follows.

    int _intUserID = 0; string _strUserName = string. Empty; string _strEmployeeID = string.empty;
     
    c# VS2005 .cs file code should stick as follows.

    int _intUserID = 0;
    String _strUserName = string. Empty;
    String _strEmployeeID = string. Empty;

    So how do you achieve this. by inserting the new line char in c#?

    Hi Murthy,

    Thanks for posting your query in Microsoft Community.

    I understand that you have problems with the code in Visual studio.

    The question you posted corresponds to the coding software, it would be better suited to the MSDN Community.

    Please visit the link below to find a community that will provide the support you want.

    http://social.msdn.Microsoft.com/forums/en-us/category/VisualStudio

    Hope it will be useful. If you still have questions, please reply and we will be happy to help you.

  • Satellite P200-1FZ: how to insert the smart media card into the card slot

    Hello

    I have read the slim manual, and I can't find any info on the card slot. (other than where he lives on the laptop)

    Could someone tell me please how to insert my card SmartMedia? the slot is huge and I'm worried about losing the card inside the laptop! I assume that the smart media will be automatically run?...

    Thanks in advance!

    It would be good to know what model of laptop you have.
    But, normally, for the smaller cards, you will need an adapter that is often included, as for the memory stick pro duo.
    I think it's just normal size and you have to put in the middle of the card reader slot until you hear a click.

    If you have not changed the AutoPlay settings, you must get a new window with the files on your card, when you put it on your laptop.

  • HP 255 G3 laptop: how to insert the cd in my laptop HP 255

    I can't find how to open the disk drive to insert the cd or dvd to play

    From the Manual:

    Can you see this button as indicated in point 3? Of the record, I also see that some versions of the G3 255 budget comes with only a "weight saver" where the DVD player is in the picture. So if you don't no eject button, your laptop does not have a DVD/CD player player.

    Post back with more questions.

    If it's 'the Answer' please click on 'Accept as Solution' to help others find it.

  • How to insert the image in the browser IMAQ instructions

    Hello

    How to insert multiple images in the browser of the IMAQ insert vi. will be taken to image in the folder.


  • How to change the value games programmatically query in OFA

    Hello

    We have upgraded to 12.2.4.There is a custom value defined in 11i is also improved to R12 which is used in an FDF attribute and the FDF is used in a de FACTO forces (drop ship site) field in the sales form

    Now the problem is this query value set has the following where would adopt with BLOCK. FIELD(:ADDR.) CUSTOMER_ID reference) that is compatible with Oracle Forms.But in R12, we use HTML frame, so the reference should be changed to dial the new code JAVA to UI in R12 customers.

    Now, how we will discover the handle value contained query mdoify the query programmatically OAF or y at - it another way to deal with

    where m.source_organization_id = FND_PROFILE. VALUE('ORG_ID')

    and m.customer_id =: ADDR. CUSTOMER_ID

    and m.subsidiary_inv_org_id = HCAS.org_id

    and HCAS.status = 'A '.

    and AHC. CUST_ACCOUNT_ID = HCA. CUST_ACCOUNT_ID

    and HZP. PARTY_ID = HCA. PARTY_ID

    Thank you

    Prabhat

    Hi AJ,.

    I tried the first option and it worked. But instead of package, I created a profile and used in the query games value and then set the profile in the process request method.

    Thanks a lot for the idea.

    Kind regards

    Prabhat

  • Do not know how to insert the call to a page external python

    Hello world

    I was wondering if someone could help me out (?)

    I have an engine builder flash card, basically, an end user can upload an image of their choice, add text (if they want), and then have a personalized card printed for them. Think of a personalised gift (i.e. McDonalds GC). The company I work for as agreed that they want to be able to control the file size of the images uploaded outside. They want to be able to limit the minimum and maximum of the uploaded image sizes. This control is done outdoors, and the coding is already written (Python).

    Python developers have already been provided by the location of the Python page, I just need to insert the call within the ACE card builder. I have extremely limited experience with AS3, as will confirm a quick check of one of my posts. So I don't quite know how I can add this new call to the Python page. I say 'new' because there is already a call to another page of Python.

    I hope I explained myself properly and you understand what I'm looking for. If this is not the case please ask and I will be more then happy to further develop. I can also provide the pre-existing AS3 code if that helps. They are more than 1,000 lines of code, so I won't add it here and add to the length of this post, until it is absolutely necessary.

    Any help is greatly appreciated!

    Use the urlloader class to call executable server-side.

  • How to display the records from a query in the non-base data field

    Hello

    I have a problem:
    I have a query with a lot of tables and column 6 (select a, b, c, d, e, f x, y, z, t, s, g where the conditions) and I use 3 parameters.
    I create 3 settings: datai,: dataf and: partner and a button with a trigger when the button is pressed.
    Then a create a block manually with six field non-database a1, b1, c1, d1, e1, f1.
    Now, I want to display all the records in my query in a1, b1, c1, d1, e1, f1 where a1 = a, b1 = b, etc. and all the records (if I have 20 record, it will display 20 records in the non-base data field) when I press the button.

    How I did it:
    I create a cursor with the query, and then
    start the open cursor
    loop
    Fetch cursor in: a1,: b1,: c1: d1: e1,: f1;
    end loop;
    close the cursor;
    end;

    It displays a single record in a1, b1, c1 only, and it must display 100 records and date for all fields.

    Can someone help me with this problem?
    Thank you.

    Published by: 928437 on October 1, 2012 02:55

    Creating a view and the query in a database block are a great solution.

    To use the block non-base of data:
    You are missing the most important Next_Record; command.

     Begin
    Go_block('X'); -- block X is the non-database block
    Clear_Block(No_Validate);
    open cursor X1;
    loop
    If :System.Record_status != 'NEW' then
    Next_Record;
    End if;
    fetch X1 into :a1,:b1,:c1,:d1,:e1,:f1;
    Exit when X1%NOTFOUND;
    end loop;
    close X1;
    end;

  • Insert the result of a query select in another table

    Hello

    I have a strange problem when I try to insert all the results of a query select in another table, using the declaration of the order.

    With the declaration of COMMAND it works fine
    Work:
    ------------------------------
    INSERT INTO ADART01 (SELECT (codart)
    "STOCK". "" CODART_STO ".
    Of
    "DB". ' ' 'ACTIONS');
    ------------------------------

    But if I try to sort the result using the declaration of the ORDER, I have the following error:
    Error: ORA-00907 missing right parenthesis
    ------------------------------
    INSERT INTO ADART01 (SELECT (codart)
    "STOCK". "" CODART_STO ".
    Of
    "DB". "" "ACTIONS"
    ORDER BY
    "STOCK". ("' CODART_STO ASC ');
    ------------------------------

    Any idea?

    Thank you for your help,
    Angel.

    delete "()" to select

    create table test1 (a number, b varchar2(100));
    
    insert into test1
        (a, b)
        select level, 'level ' || level from dual connect by level < 101;
    
    insert into test1
        (a, b)
        select level, 'level ' || level from dual connect by level < 101 order by to_char(sysdate - level, 'D');
    
    select * from test1;
    
    drop table test1;
    
  • How to neglect the comma

    Hi all versions of Oracle of 10g

    This is my request

    Select Ligne_adresse_1. «, » || Ligne_adresse_2 | «, » || address_line_3 | «, » || Town_or_city | «, » || Country | «, » || Zip_code | «, » || telephone_number_1 | «, » || Hr_locations Telephone_number_2


    If address2 and address3 is null the output is like this

    334, street maple, San Francisco, United States, 94105-2356,


    so can someone please tell how to neglect this comma

    Concerning
    Srikkanth

    You can either remove the double commas after (replace the function). or better not add the comma if the value is null.
    The NVL2 function is useful for this. But others like CASE would also work.

    select address_line_1
       ||nvl2(address_line_2,','||address_line_2,null)
       ||nvl2(address_line_3,','||address_line_3,null)
       ||','||Town_or_city
       ||','||Country
       ||','||Postal_code
       ||','||telephone_number_1
       ||','||Telephone_number_2
     from hr_locations
    
  • How to insert the value of table display

    Hi all

    I have a page element named that email and set this as view only, now I need to insert this value in the table I use insert statement like this: P255_EMAIL, but it gives an error.


    Can someone tell me how to insert this

    Thanks and greetings
    srikkanth. M

    Srikkanth,
    A single display element is not rendered at the point of entry to the difference of the other editable on the page elements, if you look at the html code of any view one item and compare it with a textfield should be clear.

    You can have another element hidden with the value that can be returned in the process
    OR

    Here's a little something that does not need any additional items to make the item view alone and still available in the world as a normal part

    Do not say P100_MY_ITEM like a textfield
    But in the text of element Pre_ give you

    <span class="display_only" >&P100_MY_ITEM.</span><span style="display:none">
    

    And in the text of item Post_ put

    </span>
    

    Hide the textfield object, it shows the value of the item as a single text to display.

  • How to insert the "html" text in the text block?

    Hello everyone!

    I have the question of the object. So, I want to insert the type html content in the block of text, something like this:

    Header text in italic and bold styles

    Some content in the normal template

    I know I should use

    TextFrame.Paragraphs.Add ('of content', null, null)

    and

    CharacterAttributes

    but don't know exactly how to write it.

    Please give me some examples?

    Thank you.

    need to make semi-auto, you start by creating two character styles in the user interface, we will call "bold" and "italic", then apply these styles to characters in the script

    var idoc = app.activeDocument;
    var itext = idoc.textFrames[0];
    
    var irangeItalics = itext.words[3];
    var irangeBold = itext.words[5];
    
    var boldstyle = idoc.characterStyles["bold"];
    var italicstyle = idoc.characterStyles["italics"];
    
    boldstyle.applyTo(irangeBold);
    italicstyle.applyTo(irangeItalics);
    
  • How to insert the HTML for Oracle Portal

    I want to insert the HTML for Oracle Portal to insert a gif, buttons, animations, flash content, how can I do?

    Thank you

    Many ways:
    -use html portlet or dynamic page on your pages

  • How to insert the value of the variable using select statement - function Oracle

    Hello

    I have a function that inserts the record based on a condition


    INSERT IN the case
    (
    Case_ID,
    Case_Status,
    Closure_Code,
    Closure_Date
    )(
    SELECT newCaseID,
    caseStatus,
    Closure_Code,
    Closure_Date,
    CASE
    WHERE Case_ID = caseID
    );

    Now, I want the new value casestatus instead of value caseStatus select statement. I have a m_caseStatus variable and I want to use the value of this variable in the select statement above.
    How can I use this.


    Thank you
    INSERT INTO Case
    (
    Case_ID,
    Case_Status,
    Closure_Code,
    Closure_Date
    )(
    SELECT newCaseID,
    m_caseStatus,  <-- here place your variable
    Closure_Code,
    Closure_Date,
    FROM Case
    WHERE Case_ID = caseID
    );
    

    Nicolas.

Maybe you are looking for

  • This cable or accessory is not certified popup while not connected iOS 9.3.4

    I've updated to 9.3.4 iOS on my iPhone 6 more this morning. Now, this afternoon, I get a popup every few minutes saying "this cable or accessory is not certified and may not work reliably with this iPhone." I'm not connected to a cable or accessory.

  • Reset questions

    I bought my new (unlocked) MB511 on Ebay and did not know that it is the 'Orange' on her network United Kingdom. That said, the phone works fine on text messages and call with no attachments. However, if I do not receive a text with an attachment I c

  • Satellite C650 - Touchpad problem

    Toshiba Satellite C650 - 13G PSC08E I found that the touchpad, wasn't work and left click did not work, tried all the fixes on the forum. Check the BIOS and updateFunction key, fine activated That all controlled parameters appear in order, so I assum

  • How to change my settings of codec audio idt high definition.

    Hi I want to change my settings from the stereo to the surround out in my laptop 2204tx g6 in idt hd audio codec.tried but failed.my idt settings shows only stereo. Any solution please?

  • How to win \\run .vhd file 7 in win xp

    Hello, I recently got a Windows xp PC to replace a Windows 7 computer. However, while I still have access to anything whatsoever on the old PC that I maybe need even once, I did a .vhd on the old hard drive file.  I can't open this vhd file, because