Oracle 10g - check when to use the CR for the address formatting

I have a table of addresses and need carriage return to the street address, city, State and zip format.
There is sometimes a p.o.box containing address2 apt # etc... The example following incorrectly adds a blank line when the address2 is null or contains spaces.
How can I check to see if the address2 is not null or contains spaces, and continue to produce the following?
AAA Five Diamond Award
P.O. Box Win111 (address2)
3600 las Vegas Blvd South
Las Vegas, NV 89109

or where null address2
AAA Five Diamond Award
3600 las Vegas Blvd South
Las Vegas, NV 89109

Here is my code:
SELECT pk_id,
Address_1
|| Chr (10)
|| Address_2
|| Chr (10)
|| City
|| ','
|| State
|| ' '
|| Zip code
Address
WHERE pk_id = 15663
Result when null or space address2:
FREEPORT 168 CAY

VERO BEACH, FL 329667109
Thanks for the tips!

Maybe this:

SELECT pk_id,
Address_1
|| chr(10)
|| nvl2(Address_2, null, Address_2 || chr(10))
|| City
|| ','
|| State
|| ' '
||Zipcode
FROM Address
WHERE pk_id = 15663

Tags: Database

Similar Questions

  • How can I make all the emails on a .bcc of distribution list when you use the address book?

    When I send an email to a "list" in my address book I want to warn all the email addresses of the recipients to be visible by all byhaving be the entire list > bcc - how can I do this with Thunderbird?

    Place the list in an address field, click the TO and replace it with BCC.

    If you do not Contact sidebar enabled in the entry window press F9 to turn it on. Select contacts or to the mail list, then use the button Add to the BCC.

  • I had Google as search engine by default, when I used the address bar to search for, but Yahoo has hijacked this function and I can't get default Google.

    Windows Firefox 29.0.01 8.1

    It doesn't seem to be an easy way to reset the default search engine to use in search in the address bar. Am I missing something?

    And also, why can Yahoo turn this function is the default search engine?

    Hi gcraighammond, I just noticed that you had a problem, a right-click. To change the search engine, click with the left button on the icon and a list of search engine options would fall down.

    Yet once, it doesn't until you move the search box back to the toolbar AND to exit to customize the view.

  • When I use the address bar to search for, I redirected to a Web page called 'startpins '. Ive tried several malware removing applications, but none have set it

    It seems there will be no solution on other forums. And I can't trace anything whether it's relevant to this site in my computer

    Hello pan903, you can try to install the addon Search reset , or manually reset the url search engine by typing on: config in the address bar of firefox (confirmed the message information where it appears), seeking the preference named keyword.url and right click and reset it to its default value.

  • Calculation of frame rates of acquisition image using the 7 Format

    So I finally got my Basler firewire (IEE1394b) camera to capture images at his rate max (120 fps).

    But to do this, I need to use the '7' Format.... which is a bit confusing to me.  When I use the '7' Format, I can't specify the frame (frames per second) rate.  Apparently, you only specify the parameters (length, width, color / mono) of the image and the size of the packets and a few other things.

    So, how can I calculate speed?  I need to know exactly how much time elapses between each image.  And it must be constant.  I can't have a different frame rate.

    NEITHER told I can calculate the frame rate using this equation:

    That comes from this article.

    But I am skeptical because the article also says:

    Please note that the time to transfer an image is slightly faster than the time it takes to acquire an image.

    People out there can clarify this for me?  Is the frame rate constant?  And then I actually calculate when using size 7?

    The rate will be constant.  It won't change from image to image.  The difficult part is to find what it is.

    Basler camera manual will tell you how to calculate the frame rate.  There are three different calculations, and gives you the slower pace is one you use.  These calculations are accurate enough, I think.

    Another possibility is to measure the frame rate, but that requires several seconds (or minutes) for a measurement precise.  The simplest method is to start a life-long and save a frame in time at the beginning, wait several seconds (or minutes) and save the time of another framework.  Subtract the chassis numbers, subtract the time and divide to get the frame rate.  With a wait of several minutes, it's extremely accurate.  To get the acquisition time, read an image whose value "Next Image", then save the chassis number and read the msec timer immediately after reading.  Using a flat sequence structure is probably the best to ensure that everything happens in the desired order.  If you loop playback, you will see real cadence cadence converge slowly.  Stop it when it is pretty accurate.

    In a program I wrote, I controlled the pace by setting the shutter exposure time.  I used the derived formula of the Basler manual for cadence and reversed to calculate the shutter speed.  This only works if you have another way to adjust the brightness levels (opening, lighting, etc.).

    Bruce

  • linux 4 oracle 10g client to connect to the server window 2003 server, oracle 10g

    Hello

    I have my 10g oracle installed on windows server 2003 server.
    On another system I have oracle 10g client is installed after edition of RedHat enterprise 4.

    I want to connect my client to the database server.

    I check using oracle universal install in that it shows installed products i.e.
    Oracle 10g client is installed on the linex system.

    but when I try to write a command like
    [oracle@satish ~]$ sqlplus$
    bash: sqlplus$: command not found
    
    [oracle@satish ~]$ tnsping
    bash: tnsping: command not found
    and it doen't show any enty applications for oracle which is strange.

    as I am new to linux.

    How to overcome this problem.

    Thank you
    Umesh

    Include $ORACLE_HOME/bin in your path (not only $ORACLE_HOME):

    export PATH=$PATH:/home/oracle/oracle/product/10.2.0/client_1/bin

    Werner

  • When I use the left arrow FF tends to go back two screens instead of one. Also when I close a tab (Web page or e-mail) FF and TB sometimes both minimize

    When I use the left arrow FF tends to go back two screens instead of one.
    Sometimes when I create a new tab it opens two instead of one.
    Also when I close a tab (Web page or e-mail) FF and TB sometimes both minimize
    When I opened a project in Tbird, if I close it, the set of Tbird farm.
    When I create a copy of the project and save to drafts, when I recover, there many other added characters generally upper and lower case or some other character.
    Both applications are up to date.versions 38.0.5 & 31.7.0
    Help!

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem.

    • Put yourself in the DEFAULT theme: Firefox/tools > Modules > appearance
    • Do NOT click on the reset button on the startup window Mode safe

    You can also try another mouse in case there is a problem with your current mouse and check the double-click setting in the mouse driver software.

  • Firefox does not open after the update. Cannot open the profile technical, even when you use the directory in cmd line path

    I'm using Firefox on a Windows 7 computer. Firefox does not open after the last update. I read the help articles and it seems that I need to create a new profile because my settings were probably corrupted. I'm unable to open the profile technical, even when you use the directory in cmd line path. I tried the following commands in the command line:

    Firefox Pei
    "C:\Program Files (x 86) \Mozilla" PEI

    Nothing happens with every order.

    I am also running Norton Internet Security. I read a help of virtual navigation features Re article that can cause a problem. The article says to check the setting of virtualization in the internet security software and to clear the virtual cache. I went through all the menus of settings in Norton Internet Security version 21.6.0.32 and I don't see anything that looked like in "virtualization" settings, so I guess that does not apply to me. "

    If you have any ideas, I had appreaciate that your expertise!

    Hello arcandl, at the launch of the firefox is not after you double-click the shortcut, it is sometimes also a sign of active malware on a system.
    you might want to try running a scan with some various other security like the free version of malwarebytes and adwcleaner tools that are specialized to remove the adware and browser hijackers.

    Fix Firefox problems caused by malicious software

  • How can I stop Firefox from sinking my IP when I use the proxy settings?

    So basically I use settings from manual proxy on Firefox from time to time to be more anonymous. These proxies are normally rather slow (but hey, it's the price for you to pay for anonymity). Sometimes I'll see a sudden leap of speed. I suspected that the proxy may not work for some reason any. So, I use a website that tells you that your IP address is to see if the proxy settings are really working. Of course when I update the site it gives me my real IP. I have check the proxy settings and it turns out that the browser was restored to use the proxy settings of the system (for some reason that is the default instead of no proxy). This happens randomly and why not apparently when I use the Manual proxy settings and it flees my IP every time that happens (and I never know when it does, unless I am very attentive). Is it possible to prevent him from returning to the system without no reason proxy settings? BTW, I tested the proxy in question after what is happening so it still works which preclude the possibility of the proxy does not (even if that were the case, I'd rather my IP don't Connect at all that the leak). So yes, any help in getting it to stop doing that would be nice.

    Hi internetman, in your system more than details it shows as active. It may or may not be something, but try to disable in case it makes a difference.

  • Satellite A660-133 - Vibrations when I use the keyboard or a touchpad

    Hello
    I have a Satellite A660-133, when I use the keyboard or the touchpad I can hear a lot of vibration from the stop of the laptop. I think that this is not normal, but actually the same model showed in the shop does the same thing. What do you think about this?

    Is there anyone who has this model and who is able to tell me what is its experience in this respect?

    Thank you!

    Hi davmat,

    I m not Satellite A660 owner, but a friend told a. He never spoke to me such a problem expect that s a great notebook with powerful hardware and he likes the design. I agree with him that s a great notebook from Toshiba!

    Anyway, if you think that it of not normal, you need to contact a service provider authorized in your country. Guys can check this problem and maybe you need a new keyboard, but this can be exchanged under warranty.

    You can find a list of aspic here:
    http://EU.computers.Toshiba-Europe.com > support & downloads > find an authorized service provider

    Good luck! :)

  • Qosmio G30-126 - no sound when I use the TV tuner

    I can't get the sound to work when I use the tv tuner in windows media Center. Can someone help me?

    Hi dude

    First of all, you should check if the sound is set to high.
    This can be checked in the-> sound and audio devices Control Panel

    Did you also check the details of the Media Center settings?

    Under settings-> General-> Media Center installation, you should check the configuration, the parameters of your speaker and Set Up TV Signal.

    Please select the country of law. This is important because each country using different PAL signals.

    Oh I forgot to mention that you can change the settings in the BIOS of PAL and NTSC.

  • No bass when you use the docking station to not probe

    When I use the out port of my docking station (Series edited by moderator) I get no bass sound, just hail my wide range speaker. When the speakers are plugged into the headphone jack directly on the laptop it normal sound, with a full range of sounds. I checked the setting in the CP of its speakers are identified as the range, so this isn't the issue. There is no sound improvement enabled in Control Panel SRS. I'm puzzled. Why no bass when you use the docking station only. I tried two different docking stations with the same result: no bass.

    Yes! I finally solved it on my system:

    • Go to the control panel
    • Choose the material and audio

    or simply to display all Control Panel items

    • Select SRS Premium Sound Pro (it's an icon of circle blue/white)
    • Wait for the program to come black EQ
    • Select the tab/words "listening experience" near the top of the window of SRS Premium Sound PRO
    • Uncheck the 'improvement of Audio '.

    Fact

    In addition, there is the graphic equalizer in there that totally works well to further fine tune your desired speaker and the audio preference.

  • Why do you want my piece of sound through my TV sony vaio when I use the HDMI connection

    original title: sound through my tv speakers
    Why do you want my piece of sound through my TV sony vaio when I use the HDMI connection

    Hello

    What version of OS are you using?

    Check if the sound configuration is set to HDMI

    1. click on start, click on Control Panel

    2. click on the Audio tab, select read. Now, check if you have selected Digital Audio (HDMI).

  • How to stop the red symbols to appear when I use the question mark, the apostrophe and slash keys. This only happens in my e-mail program.

    How to stop the red symbol to appear when I use the key question mark in my e-mail program.

    HI Julie Delany.

    1. for how long are you facing this problem?

    2. is there any changes made prior to this issue?

    3. may I know what mail client do you use?

    Disable the function key (lock) and then check

  • Windows Mail stops when I use the spellchecker

    Windows Mail sometimes/often stops when I use the spellchecker.  There is no obvious reason or a consistent trigger I can find.  I lost the email I typed.  I would prefer not to have to record every email in my drafts before I check spelling it.  How can I fix?

    Hi Holnee,

    Looks like you can have something in the background, interfere or that we would need to check the system for any problem files.

    The first thing you can do is to check your system for any possible infection such as a virus or spyware. Do a full scan of the system and see if you find infections and if yes which solves the problem that you are experiencing.

    The next thing to do would be to put yourself in a situation of clean boot to ensure that no background program interfere.

    1. Open the Start Menu
    2. Type msconfig in the Search box and press enter
    3. Click on continue in the UAC prompt
    4. On the general tab, click Selective startup.
    5. Under Selective startup, click on to clear the Load Startup items check box.
    6. Click on the Services tab, click to Select the hide all Microsoft Services check box and then click on disable all.
    7. Click OK.
    8. When you are prompted, click restart.
    9. After the computer starts, check if the problem is resolved.

    If that still does not solve the problem then let's you run the System File Checker.  It will scan all protected system files and replaces incorrect versions with appropriate Microsoft versions.

    1. Open the Start Menu
    2. Type the command prompt in the box start the search
    3. Right click on command prompt and select run as administrator
    4. Click on continue in the UAC prompt
    5. Type the following command and press enter:
      sfc/scannow

    Please let us know if this solves your problem, or if you have any questions.

    Matt
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

Maybe you are looking for

  • vista restore Favorites

    Hi Please help.I backed up my favorites on my Win Vista, now I have upgraded to Win 8 and I want to restore it in bookmarks. A lot of websites that I had an automatic log-in. It doesn't let me do. If there is no solution I have to re - install vista

  • Fraudsters

    Some time ago I was sent a friend of an unknown user "xxxxx xxxxxx" request knowing I had idea of who it was so I thought ishould accepts and see who it is, just today this person contacted me after agreeing, he asks friend and what she said was not

  • Serious decision to make

    Dear friends, I just bought a T61 with T8300, Quadro, 1680 x 1050 yesterday with Vista Business 32 on it. I got together 3 disks for the downgrading to XP. Given that I have a lot of things that work in my previous laptop XP + original office XP (whi

  • should I cleanlab app on my computer... not in the programs

    First of all I was to get rid of old programs.I saw him own laboratory App.I clicked uninstall / at the same time he got up.stoped the uninstillation, but is not in my trash?

  • In XP, try to disable guest account, get message that the specified program is not a ms - dos program

    When I try to turn off guest account, I get: the specified program is not a ms - dos program