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

Tags: Database

Similar Questions

  • How to get the comma in the number format?

    Hi all

    I have a requirement to obtain a number with commas.

    I achieved this goal using the converter. (< groupingUsed = "true" integerOnly = "true" minFractionDigits af:convertNumber = '2' maxFractionDigits = "2" / >)
    My textbox is limited to 5, if I give the number like 12345 then it appears in the form 12,345.00 (which is expected)

    I want to change the same number from 5 to 6. so if I remove the number 5, the comma is also taking as a character and not allowing me do not enter 6 in the end.

    If I remove the comma, then only it is allowed me to type 12346.

    I tried to delete the comma using javascript using the function that is called from clientListener below.

    < af:clientListener method = "removeComma" type = 'focus' / >
    function removeComma (evt) {}
    var currentValue = document.getElementById('r2:1:it8::content').value;
    var currentValue.replace = newValue (/ a, / g, ");
    document.getElementById('r2:1:it8::content').value = newValue;
    }

    Using this script comma was deleted at the time of change, but after changing the number and press ENTER key so I get no comma.

    I wrote this code in pagefragment and my version of jdev is 11.1.2.4.0.

    Help, please.

    Kind regards

    Shakur.

    Try to remove maximumLength = "5" inputText and use af:validateLength as:

    
         
         
    
    
  • How to remove the comma in 65 321...

    Hello

    I want to remove the commas of the variables.

    for example,.

    Str = 65 321

    herein, I need to remove the comma. My str therefore 65321. y at - it any accumulation of functions...

    Thanks in advance,

    Sathya N.

    stringwithoutcommas = stringwithcommas.split(",").join("");

  • 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

  • How to write the comma delimited numbers of configuration file

    Hello

    In the attached Configuration File.vi write, I am trying to crush several whole decimal in the keys 1 and 2 of the attachment Test.ini. I am to convert the array of integers in a string. Because of this, the string written in the ini file is now being bracketed by apostrophes. What should I do to write the string without the apostrophes, as in the Test old.ini file?

    I appreciate your help. Thank you.

    Best regards

    Peter

    See here:

    http://forums.NI.com/T5/LabVIEW/configuration-string-keys-in-LabVIEW-2009-changes/m-p/1147371#M50489...

  • GREP add a space after the comma

    I'm sorry it's so basic, but it drives me crazy. I need to find commas, which are immediately followed by any character of the letter and to put a space between the comma and the letter.

    For example: MD, DDS, PHD must be MD, DDS, PHD

    I know I start with this: (en) [\l\u]

    I don't know how to keep the comma and the same character.

    Thanks for your suggestions.

    You can use the following expression

    Search: (en) (\w+)

    Change: $1 $ 2

    Hope it solves your query

  • How can I escape commas inside the function listQualify?

    I have

    am a newbie in coldfusion. I need help. My database has records of names of companies as: abc, Inc. For now I'm using this query:

    SELECT DISTINCT COMPANY FROM ComapanyTable WHERE (Company IN (#ListQualify(form.cCompanyList2, "'", ",")#))

    This problem is that it separates CBA, Inc..

    SELECT DISTINCT Company FROM CompanyTableWHERE (Company IN ('abc',' Inc.','xyz','Inc.'))

    I need to get the list, as it is, i.e. as: "abc, Inc.", "xyz, Inc." so that I can later insert these values into a new table.

    Insert the code:

    <cfquery name="insertPair" datasource="#DSN#" dbtype="ODBC"> INSERT INTO tblChildCompanyToParent (Parent_Account_ID, Child_Account_ID) SELECT DISTINCT <cfqueryparam value = "#form.pCompanyList#" CFSQLType = "CF_SQL_VARCHAR">, Company FROM CompanyTable WHERE Company IN (<cfqueryparam value="#ValueList(insertSelect.Company,';' )#" CFSQLType = "CF_SQL_VARCHAR" list="true" separator=";">) </cfquery>

    Code of the selection list

    <select multiple name="cCompanyList2" id="cCompanyList2" class="selectCCompany" data-attribute="selCCompany" size="10"> <cfloop query="childCompanyList"> <option value="#childCompanyList.Child_Account_ID#">#childCompanyList.Company#</option> </cfloop> </select>

    Y at - it anyway to solve this problem.

    Thank you for your help.

    I managed to fix it.

    I posted the solution to StackOverflow

    SQL - how can I escape commas inside the function listQualify? -Stack overflow

    Thank you once again!

  • How to get the values separated by commas of multiple records in table

    How to get the values separated by commas of multiple records in table

    for example

    name address age sex
    a 12 m e
    b hh 12 f
    BB c 13 h

    I need to get output as a, b, c from a query

    Use the query as below he works for me, change the names of tables and columns

    SELECT SUBSTR (SYS_CONNECT_BY_PATH (PROXY_EMAIL, ','), 2) csv FROM (SELECT PROXY_EMAIL, ROW_NUMBER () ON the rn (ORDER OF PROXY_EMAIL), COUNT (*) NTC (STARS_PROXY_ASSIGNMENT) WHERE EMPLID = #EMPLID) WHERE rn = cnt START WITH rn = 1 CONNECT BY rn = rn + 1 ADVANCE

  • How to integrate the work of Commit in action Delete

    Hello
    In the sample the more I learn, there are some buttons to the user interface, New, Update, Delete, Commit and Rollback. When I click on the button Delete, the Entity object is removed from the Cache and pool, not actually removed from db, that after the validation button, the entity will be removed from the db indeed. But in most real world cases of use, when the user deletes a line, she always popup a "confirm". If it selects Yes, the line will be removed from db directly. I want to know how to integrate the button post button Delete?


    Bob Zhou

    Hi, you can achieve this way:

          
          
    

    Kind regards

    Branislav

  • How to open the H.265 duplicator of Blackmagic design video clips

    How to open the H.265 duplicator of Blackmagic design video clips.

    You could try VLC.

    If you mean for editing then unfortunately Apple is very, very backward these days in terms of codec support. You will probably need to look at Adobe first place.

    Its a bit of chicken and eggs at the moment, we do not know if the reason for Final Cut Pro X is neglected is because the Mac Pro has not been upgraded, or have Apple decided to abandon the Mac Pro, because they are more interested in market Pro at all.

  • How to clear the error 314101

    I am trying to create a mechanism of robust communication between a cRIO and a desktop application HMI. I tried to use the network stream I could avoid a lot of pitfalls in the management of a TCP connection. My RT code must be written to operate, and must recover gracefully network disconnections and brutal power loss. I can simulate these things quite effectively pulling the Ethernet cable or hit the button to Abort in LV

    My goal of RT has a drive with the endpoint name ' commlink/drive '. My HMI has a burner with the name "commlink/recorder. HMI tries to establish the connection: he gave the Player URL ' / //commlink/player. This set works very well on the first pitch, but not after abandonment to the RT code. On the next run, the RT code often receives the error 314101 (endpoint with the same name already exists.) to create network Stream Reader Endpoint VI. I can't understand how to clear this error in order to recreate my end point and restore the comm link. Does anyone know how? Calling the destroy Stream Endpoint VI with refnum workflow does not work, and there are no other screws or properties that look like they manage the connection management.

    I know I'm coming to the end of the conversation, but maybe some of this information will still be useful.  While network streams were designed to manage multiple connection/disconnection cycles with the underlying TCP/IP connection on the network seamlessly, they were not intended to perfectly manage and survive many lives or running instances application with endpoints.  All this is still possible, it will take more work on the part of the implementer.  An important thing to remember when using network flow, is that once you've managed to connect the two end points, the destruction of one of the endpoints (via normal stop or an accident) will require the destruction of the other end.  This means that you cannot simply reuse on RT target endpoint to communicate with several sessions of HMI.  Instead, you will have to destroy endpoint on the target of RT and create another endpoint (probably with the same name) for the next session.

    To do this, I recommend a state machine that is basically:

    1. Create an endpoint - you can do either with an infinite time-out or a continuous loop with a timeout if you need meet orders of demolition/judgment of the user.
    2. Continuous read/write in the flow in a loop.  If at any time you receive a fatal error of read/write, leave the loop.
    3. Destroy the end point and return to the State first, where you can wait for the next connection.

    I would avoid going down the road of trapping of the specific error codes and writing conditional logic for each of them.  Network stream API was designed such that for most / all cases, you should should not do this.  If you have a healthy stream that can still move the data, you will not be getting errors from the read or write call (apart from a few things matter as if we were trying to read from an endpoint unique writing of corner).  If you get an error in reading or writing, it usually means your workflow is dead and you need to create a new one if you want to continue to communicate with the remote application.

    If you follow the above, I think that you are 90-95% of the way.  As the article you link above mentions, there are additional considerations to take into account if you need to tolerate the application crashes / accidents of remote endpoint.  In these scenearios, you basically have one of the three results of the application that always uses the end point which don't collide:

    1. Demand will start to return errors:  In some scenarios, we can detect the remote application is crashed, abnormally terminated, or whatever.  In these cases, the read/write will return an error and the same pattern described above should work.
    2. The flow will introduce a disconnected state and stay offline:  This would generally happen with a fall in demand.  In these cases, we cannot tell if the connectivity loss is due to a problem with the application or poor network conditions / remote computer.  If you need to detect and recover from this scenario, you can do as a section of the link recommend you and write a timer that resets the stream network if the flow remains disconnected for a period of time.  This could be incorporated in step 2 of the above state machine quite easily.
    3. The flow will continue to make a State connected, even if the remote application is no longer functional:  This should rarely occur and would occur only when the application on the remote computer hung or an impasse, but the network computer stack is still in operational condition.  In this case, we cannot differentiate between a suspended application and the other simply has all the data to send.  If you need to detect and recover from this condition, the best thing to do is probably to create a second timer that resets the stream if it's too long you've changed successfully read/written all the data.

    I must emphasize scenarios 2 and 3 can be greatly simplified if you care to detecting the crash & block until another application attempts to connect to the application that is still ongoing.  For example, restarting the application has crashed/hung will recreate an end point and try to re-establish the connection of flow.  At this point, the application which is still running will go account he communicated with endpoint remote must have crashed and raises an error.  At this point, the same state machine mentioned above should be sufficient to re-establish the connection.  I think that this part could be more difficult in LV 2010 since the first attempt to apply newly restarted it also throw an error when you try to reconnect to the remote application.  This will occur until the endpoint in the live application was also destroyed which means that you would have to execute a loop on creating calling until she succeeded.  In 2011, we changed the behavior so the call to create the newly restarted application would cause the remote application to start return errors, but now we are still trying to establish the connection on the newly restarted application for up to the timeout limit.  If you use a state similar to the above machine, you should be able to reconnect without having to write a loop around the call to Create in the newly restarted application.

  • How to create the shared library for linux real-time target in labVIEW Windows?

    I use myRIO running linux in real time. In my project, I need to pack some C code, so I tried the node library function call.

    I know that I should use the tools compile cross - compile linux on Eclipse to compile c code in linux .so library. But the problem is that call library function node does not recognize the .so file because my labVIEW runs on a Windows PC.

    What should I do to fix and how to combine C code with labVIEW during programming for devices shipped as myRIO?

    Basically, you must also create a Windows DLL that exports the same functions. These functions can be empty stubs if you do not want to run the code correctly on Windows, otherwise you will need to consider how to implement the equivalent functionality on the Windows API.

    Then you can write in your node library call as the name of the library ". "*" and the name of the shared library Windows ".dll" while the Linux version is called "name of your library > .so". LabVIEW will replace the * after the comma in the name of library with everything that is the preferred extension shared library for the platform it is running on and therefore load the right shared library.

    Alternatively you can wrap call all the nodes of the library in a structure that contains the node library in the case of Linux RT and all what you want to run on other platforms in the case of default or a case of specific platform, call the conditional compilation.

  • HP Pavilion 15: bought and returned the faulty HP laptop - how désenregistrez the point of records of HP?

    Hello

    Last week, I bought a laptop HP, therefore, I explored with enthusiasm and registered the product on the HP website.

    Unfortunately, it was a "bad order" element that the dealer had neglected and sold to me.

    Therefore, how to unregister the article...?

    See you soon!

    Hello

    Support HP members contacted me - solved.

    See you soon!

  • Determine the Comm Port assignments

    I have a program more old that needs to use Comm Port 1 to access the unit I connect.  When I open the Device Manager, then the comm ports, I see, it's Comm Port 1 is in use.  How can I determine which device using the port so I can assign a different port of this unit thetreby opening Comm port 1 the device I want to be able to use it?

    Hello

    Refer to this link and check if it helps.

    http://support.Microsoft.com/kb/174904

    It will be useful.

  • How to remove the live windows messaging account without deleting messages

    How to remove the live windows messaging account without deleting messages

    If you mean Windows Live Hotmail, or Outlook.comm messages are stored on their servers, if you delete the account, you also delete the mail.

    Did you mean something else?

Maybe you are looking for