What Function will replace 0 & NULL?

In Oracle simple update statement, what function should I use to update a column with a new value following below rules:
Replace current "0" or NULL with the new value
If there is an existing value, do not update it
DECODE would work in select statement, but this is update ... SET ...
Thanks

update your_table
set some_column = new_value
where some_column = 0 or some_column is null;
Or, you could use a case statement.

Similar Messages

  • You sent me a notice letting me know that adobe forms central will not continue any more. What tool will replace it? How can I continue creating forms? Thanks for your responses.

    You sent me a notice letting me know that adobe forms central will not continue any more. What tool will replace it? How can I continue creating forms? Thanks for your responses.

    Hello Chalo,
    There are many FormsCentral alternatives. Our solution, JotForm, has the most complete Import Wizard both for your forms and for your response database.
    http://www.jotform.com/formscentral/

  • What application will replace adobe flash player

    What application will replace adobe flash player on iPad

    There are a number of apps, none of which all work perferctly, but one that you could try is iSwifter.

  • Oracle HRMS or Peoplesoft: what functionality will be retained in fusion-08

    Hello all,
    Imagine you have a customer on EBS financials.
    He is interested in an HR extention, and looks at Peoplesoft, Oracle and SAP as potential implementation solutions.
    What is the market leader in Europe, and what would you recommend, taking into account that Fusion will only be there by 2008? Go for best of breed?
    What will Oracle do when integrating? Take peoplesoft as best of breed and embed that functionality?
    Any input is welcome.

    Interesting question, but i do not have a crystal ball. I would not wait, and count on Oracle for a wel defined upgrade path towards Fusion.
    In how many European countries you want to implement HR? If, for example, your company is only in Belgium, i would not go peoplesoft, since Oracle opted for Oracle there.

  • What app will replace iPhoto for editing?

    I've been searching many apps on the Apple App Store and I haven't found anything that had the editing capabilities of iPhoto that was aseasy to use or as well integrated. iPhoto was one of my favourite for on the go editing because I could do things like whiten teeth, smooth facial colouring, remove chapped lips etc. nothing on the App Store compares. What will Apple provide that will accomplish this? Photos certainly doesn't.

    Here is a preliminary screenshot of Photos for Mac:
    https://thephotosexpert.com/tips/2014/6/27/aperture-dead-long-live-photos#.VMfiA smppHg
    The "Edit" options are to the right. I hope the final version will be offering more.

  • My IPhone 5 broke, what phone will they replace it with?

    My Phone 5 broke (screen, no fault of my own) anyway, I rung Apple and went through everything I had to and tried resetting it however it still kept going white, anyway, I'm going to visit the apple store Tuesday, where the man said they will replace my phone..
    I have an Iphone 5 and I know they don't make them anymore only the 5S and 5C, so I'm just wondering if anyone knows what they will replace it with, wherever or not they will give me another iphone 5 or a 5S/ 5C (I hate the look of the 5C's)
    thanks in advance :)

    With another iPhone 5 exactly as yours .Apple will  have service stocks to cover many years .
    They have stopped iPhone 5 Retail only

  • What functions in lion will not work on my macbook i bought in 2008

    I bought lion yesterday and I do not know what functions will not work with my MacBook I purchased in 2008

    You won't notice the ones that don't work!
    Anyhow, based on my 2007 MacBook (which should be similar), and on the assumption that you don't have a multi-touch trackpad (i.e. one that recognises threee fingers or more):
    1. AirDrop won't work.  You don't have the hardware to run this.
    2. Multi-touch swipes (three finger navigation between Spaces, invocation of Mission Control etc) won't work.
    3. Automatically disappearing scroll-bars won't work (i.e. they will be permanent)
    Pretty much everything else will work as well as it does on other platforms.

  • Upgrade from CS4 to CS5--what functions in CS4 do I lose?

    By grading from CS5 to CS4, what functions will I lose in CS4? I see that the "upgrade" button is greyed out in CS4. Anything else?

    Just to be clear (and I don't think I was originally)...the upgrade is from CS4 to CS5. I see that CS4 is still available and operating. I just wanted to make sure it wouldn't become "dead" after upgrading to CS5.
    Thanks for all the information and responses.

  • What can i replace this bind variable with in function?

    Hello
    I am creating a report showing training attended by employees. I have written a function to do the following:
    Parameters 1 - 4 is hard coded for a reason. So we dont worry about them.
    5th parameter: :START_DATE represents the date training started
    6th parameter: :END_DATE represents the date training ended.
    These date parameters are correctly used inside the select statement that the function is built upon. So don't worry that my date parameters are correct/incorrect.
    The focus should be on how you use bind variables inside Discoverer Admin. The select at the bottom runs perfectly in Toad and it allows you to use the date parameters as bind variables. But it does not allow it in Discoverer Admin
    The problem is with Parameter 5 and 6. I dont want to hard code the dates as i want the user to be able to enter his own date parameters.
    Discoverer Admin gives an error is i want to use :START_DATE and :END_DATE as parameters
    Does anyone have a solution for my problem.
    This is what the code looks like.
    SELECT apps.xxhr_fsc_training_info.xxhr_fsc_training ('A', '02','M', 'N',:START_DATE, :END_DATE)category_A_training
    , apps.xxhr_fsc_training_info.xxhr_fsc_training ('B', '02','M', 'N',:START_DATE, :END_DATE)category_B_training
    , apps.xxhr_fsc_training_info.xxhr_fsc_training ('C', '02','M', 'N',:START_DATE, :END_DATE)category_C_training
    , apps.xxhr_fsc_training_info.xxhr_fsc_training ('D', '02','M', 'N',:START_DATE, :END_DATE)category_D_training
    , apps.xxhr_fsc_training_info.xxhr_fsc_training ('E', '02','M', 'N',:START_DATE, :END_DATE)category_E_training
    , apps.xxhr_fsc_training_info.xxhr_fsc_training ('F', '02','M', 'N',:START_DATE, :END_DATE)category_F_training
    , apps.xxhr_fsc_training_info.xxhr_fsc_training ('G', '02','M', 'N',:START_DATE, :END_DATE)category_G_training
    from dual
    Edited by: iandekoker on Jun 8, 2009 9:34 PM

    Rod
    I have a request. The request is based on various emails written about passing parameters in Discoverer Admin/Desktop. Now if you are experienced and work with set copntext on regular basis then it should be a walk in the park. However if you are new to it like me, then it seems a daunting task. So my request is: Can't you provide us with an example of how to complete the whole process from begin to end using an actual example? I will kick off the process and maybe you can add where i left something out?
    Example:
    SELECT ENAME, HIRE_DATE
    FROM EMP
    WHERE HIRE_DATE = :IDATE;
    We want to run this select statement in Discoverer Admin, but Admin does not like the :IDATE bind variable. So now we are gonna use SET CONTEXT to find a solution to our problem.
    Step1:
    First we have to create a context namespace in the database for the Discoverer contexts. Here is the code to create the context. It is okay to also named your function EUL_DISCO as this name would work perfectly for almost everyone. Best is to do all of this in the Apps schema. Copy and paste this code in Toad and F9 it. It should compile successfully
    CREATE OR REPLACE CONTEXT eul_disco
    USING apps.eul_disco;
    Step 2:
    Now you need to create a package to enable you to set and retrieve contexts from in Discoverer. Here is the code to create the package and package body. Just copy and paste the code into Toad and F9 (execute) it to create the package.
    --Package Spec
    CREATE OR REPLACE PACKAGE eul_disco AS
    FUNCTION set_context(p_name VARCHAR2, p_value VARCHAR2) RETURN VARCHAR2;
    FUNCTION show_context(p_name VARCHAR2) RETURN VARCHAR2;
    END eul_disco;
    --Package Body
    CREATE OR REPLACE PACKAGE BODY eul_disco IS
    FUNCTION set_context(p_name VARCHAR2, p_value VARCHAR2)
    RETURN VARCHAR2 AS
    BEGIN
    dbms_session.set_context('EUL_DISCO', p_name, p_value);
    RETURN p_value;
    END set_context;
    FUNCTION show_context(p_name VARCHAR2)
    RETURN VARCHAR2 IS
    BEGIN
    RETURN SYS_CONTEXT('EUL_DISCO', p_name);
    END show_context;
    END eul_disco;
    Step3:
    Once you have created this package successfully you need to log into Discoverer Admin. Then use the menu to navigate to Tools > Register PL/SQL Function. A window called 'PL/SQL Functions' will appear. Select the 'Import...' button. A new window called 'Import PL/SQL functions' will appear. Scroll down until you see set_context function. Once you found it click OK to import it to End User Layer. Do the same to import show_context function. Remember there are two functions and you need to import them both. When you are done, click 'Apply' button. Then click 'OK' button. You can double check to make sure your functions have been imported. Just nagivate to Tools > Register PL/SQL function again. When the window 'PL/SQL Functions' appears your function(s) should be in the list on the left hand site. Scroll down untill you find them.
    Step4:
    Now it is time to set your session parameters in a separate worksheet inside Discovere Desktop from your main reports. The following steps show you how to create a worksheet to define an effective date parameter. The parameter worksheet should be based on a folder that always returns exactly one row.
    Log into Discoverer Admin. Open the Business Area you want to use. Then create "New Custom Folder..."
    Copy and paste this code (select sydate from dual) inside the New Custom Folder and validate the code. Also rename your folder to 'Set Context Folder'
    Step 5
    Next log into Discoverer Desktop and choose 'Create New Workbook'. Then choose table layout option. In the available list choose 'Set Context Folder'. When you have highlighted 'Set Context Folder' click on '>' button. Then click then 'Finish' button. Once the workbook is created you will see 1 column called Sysdate and a row with today's date in it. Save this workbook and name this workbook XYZ. You might even rename the sheet to QWE.
    Step 6:
    Still in Desktop working on XYZ workbook on QWE sheet, click on Tools > Parameters > New. In the 'Name' field enter START_DATE. Next leave 'Create condition with operator' box unticked. Next in 'Prompt' field enter START_DATE. In 'Description' field enter START_DATE. In 'Default' field enter NULL. Click OK button when you are done.
    Step 7:
    Still in Desktop working on XYZ workbook on QWE sheet, click on Tools > Calculation > New. Click on 'Functions' radio button. Then click on 'Database' folder to expand it. Scroll down till you see 'Set Context' function in the list. Select it and click 'paste >>' button. It will now show: SET_CONTEXT(P_NAME, P_VALUE). Now you need to replace the two parameters (P_NAME, P_VALUE) of the function. Replace P_NAME with 'START_DATE'. When you are done click on Items radio button. Then click on the Parameters folder and select Start_Date.
    When you are done it should look like this: SET_CONTEXT('START_DATE',TO_CHAR(:START_DATE))
    You might want to rename this calculation to START_DATE
    Ps. If you need to create two date parameters START_DATE and END_DATE then you repeat step 7 cause you need one more calculation.
    Just replace START_DATE with END_DATE. You also might want to call this second calculation END_DATE. Thus when you are done you will have 2 calculations:
    SET_CONTEXT('START_DATE',TO_CHAR(:START_DATE))
    SET_CONTEXT('END_DATE',TO_CHAR(:END_DATE))
    This is useful when you want date parameters similar to: 'where date between :Start_date and :End_date'
    Step 8:
    When you now run the XYZ workbook (QWE sheet) it will prompt you for an START_DATE. Enter 10-Jun-2009 (make sure the format you enter the date is similar to the format you have set up in discoverer). Now your XYZ workbook have 2 columns. First column is still called Sysdate with today's date. The second column is called START_DATE with 10-JUN-2009 in it.
    Step 9:
    Now you want to remove the 'SELECT SYSDATE FROM DUAL' data stored in 'SET CONTEXT FOLDER' from your XYZ workbook (QWE sheet) as you no longer need that. Still working with Desktop inside XYZ workbook on QWE sheet > click on Sheet menu option > then Edit Sheet option. On the Select Items tab click on 'Set Context Folder' and click < button to remove the folder from workbook XYZ. Click OK when done and run the workbook XYZ (sheet QWE) again. Now the workbook XYZ (sheet QWE) should only have one column called START_DATE and 10-Jun-2009 as the only row.
    Step 10:
    Rob you might want to come in here. It is also useful to create another calculation retrieving the value of the parameter, so that the value entered for the parameter can be seen when the workbook is run. Please give step by step instruction to complete this process
    Step 11:
    Still remember your initial problem where we wanted to use :IDATE in Discoverer Admin folder, but Discoverer Admin did not like the :IDATE syntax?
    SELECT ENAME, HIRE_DATE
    FROM EMP
    WHERE HIRE_DATE = :IDATE;
    Solution:
    Well now you just replace :IDATE with TO_DATE(SYS_CONTEXT('EUL_DISCO','START_DATE'))
    Log into Discoverer Admin. Open your Business Area. Then create 'New Custom Folder..'.
    Copy the code below and paste it into the new custom folder.
    Then validate the code.
    Rename the new custom folder to 'Solution'
    --copy and paste this code into folder 'Solution'
    SELECT ENAME, HIRE_DATE
    FROM EMP
    WHERE HIRE_DATE = TO_DATE(SYS_CONTEXT('EUL_DISCO','START_DATE'))
    note: 'EUL_DISCO' is the name of the context and package you created in step1
    : 'START_DATE' is the name of the calculation you did in step7
    Then log onto Discoverer Desktop > open your workbook XYZ > open sheet QWE.
    Click on Menu item called Sheet > New Sheet > choose Table layout > click next > scroll down available folders till you find SQL folder with then name 'Solution'. Select 'Solution' folder and click > then click Finish.
    The folder named 'Solution' will be used to populate the newly created sheet with data. You might want to rename the newly created sheet to 'Finally'.
    At this point workbook XYZ should have 2 sheets (QWE and Finally).
    Sheet 'QWE' contains the parameter and nothing else.
    Sheet 'Finally' displays the code found in folder 'Solution'
    First you run sheet QWE to set parameter. When prompt for a date enter '10-JUN-2009'. Click OK button.
    Then click on sheet 'Finally' to allow the parameter to take effect and do its job. You will see that only data true of 10-JUN-2009 are displayed
    Notes:
    This is a very simple example. But if you work thru this example, then you will get the concept behind the idea and would you be able to satisfy your own need.

  • What phone will I get for a replacement iphone 5

    What phone will I get to replace my iphone 5 since they stopped making iphone 5

    If they still have them in reserve, you'll get one of those; just because they stopped selling new ones doesn't mean that they don't have replacements on hand. If not, you'll either get an iPhone 5C or 5S.
    (111170)

  • The sleep/wake function would not show in general to turn it on. I have a Targus case but the function will not work. What's going on?

    The sleep/wake function would not show in general to turn it on. I have a Targus case but the function will not work? The place it should be their is. Auto lock,  Password lock,  and Restrictions

    Keirosform wrote:
    The sleep/wake function would not show in general to turn it on.
    Ther is no "sleep/wake" setting in Settings > General.
    Auto lock,  Password lock,  and Restrictions
    Yes, these are the only three settings..
    I have a Targus case but the function will not work?
    What function? It won't go to sleep?
    Press the Power button on top. Does it sleep?

  • My daughters Macbook's (3 years old) computer screen sometimes will waver and freeze and then turn white if not moved around. She was told that the replacement part would cost $600.  Do you know what's going on, and what is the replacement part?

    Mydaughters Macbook's (3 years old) computer screen sometimes will waver andfreeze and then turn white if not moved around. She was told that thereplacement part would cost $600.  Do youknow what's going on, and what is the replacement part? 

    Who told her that the replacement piece was $600?
    Ask those people which piece it is.

  • Lua function to replace metatags in a string?

    (Maybe this is a recipe request for the new cookbook site.)
    I'd like a function that, given a string and a LrPhoto, will search and replace tags in the string with metadata from the photo. So, given a string 'The title of this photo is {{title}}', it would return a string where {{title}} has been replaced with the LrPhoto.getRawMetadata('title') (or maybe getFormattedMetadata). I'm sure it's been written more than once. Is there one out there to be shared before I write my own?
    db

    I spent the time on this myself and don't know why I bothered asking, it was so simple. Here's what I did. First, a general-purpose function to replace any token in a string with values from a table:
    -- replace any string of characters in a string that are surrounded by curly
    -- braces (e.g. {foo}) with the value in the table corresponding to 'foo'.
    -- will replace all tokens in braces if there are more than one
    function DFB.replaceTokens( tokenTable, str )
        return str:gsub( '{(.-)}', function( token ) return tokenTable[token] end )
    end
    Then, if you want to do this with a photo's metadata, just pass the table that's returned from getRaw/FormattedMetadata:
    line = DFB.replaceTokens(  photo:getFormattedMetadata( nil ) , line )
    So if line starts out with "my caption is {caption}" and the photo's caption is 'My Photo Caption', the result is "my caption is My Photo Caption".
    I use this in a simple templating system that reads an HTML template from a file and does this for each line as it reads/writes it. Works well.

  • How to use replace function to replace word

    I am trying to write a replace function in which I replace CA with California in an address string.
    I am trying to avoid using regular expression and just use other functions like replace, instr, trim etc.
    But what my main confusion is how do i take care of three cases in which.
    CA can be present with spaces before and after it like.
    - Redwood City, CA 96403
    CA can be present with spaces only before it and after it the string ends.
    - Redwood City, CA
    and I do not want to replace any other CA in the string that is part of other word
    - Blaca Street CA
    ( for example do not replace ca in Blaca)
    or
    - Cardinal Dr CA
    Thanks

    Hi,
    user6287828 wrote:
    ... (only four of these abbreviations need to be replaced)In that case, nesting the functions one inside another won't be too bad. But watch out: this is exactly the kind of requirement that changes over time. You might only need 4 states now, nut next year they might expand the application so that you need all 50 states (plus Puerto Rico, and DC, and ....). In that case, something like MODEL, or a user-defined PL/SQL function, would be better.
    As these are abbreviations these will always be stand alone words and never part of words. And these abbreviation can be at the beginning or end or in between the string.
    And any abbreviation can be present in one column.
    More than one abbreviation can be present in one column
    None of the abbreviations can be present in this column.
    For example
    column
    3251 BLACA ROAD CA 94305
    74 CALDWIN STREET CA
    67 DIGITAL DRIVE NM
    NM UNIVERSITY AVENUE 890
    7645 ROCHESTER NY PARK STREET
    834 GRAND AVENUE ATLANTAPost CREATE TABLE and INSERT statements for the sample data.
    Include all special cases, e.g. more that one abbreviation in the same column.

  • My iphone 4s wont switch on or reset. i spoke to apple earier and they will replace the phone under warranty. i didnt back up my phone on itunes or icloud. as the phone will not switch on i am unable to do this now. any ideas how i can get these off?

    My iphone 4s will not switch on. Supposidly it has been "charging" all day and stll it does not have enough life to switch on. Rang Apple this morning and they will replace the phone under warrenty free of charge. Only problem is with this being my first Apple product i didnt realise my phone did not automatically back up on itunes or icloud as i had to set this up.
    Now i am trying desperately to get my phone to switch on so that i can save all of the baby pictures of my 7 month old son and its not working. i have tried to reset the phone but it does nothing!!
    Can anyone PLEASE help as i am very upset and do not want to lose these precious memories?

    You cannot get Applecare plus now.
    It is unlikely that they will replace as it is damaged.  The only way to find out is to make an appointment at the genius and and see what they say.

Maybe you are looking for

  • How can I only download my music to my phone?

    My husband and I share an itunes account and music library.  When I sync the phones they have coppied ALL of the music and not only the songs we chose.  What did we do wrong? 

  • Smartforms  -   print option

    hi i have done an requirement in smartforms. i dont need the dialog box (which contains output device name, page selection etc) when i take the print (smartforms).

  • Footer not rendering correctly in IE6

    Hello to all, I'm back again with a 2 new issues. I centered the site per all the advice I received on this Forum (Thanks). But now the footer, although centered, appears shorter in width when viewed in IE6. Also, some code appears in the upper LH co

  • CREATE PO

    hi all how to make two purchase order from one purchase requistion by taking referance of PREQ

  • Htlm link to css question

    Hello Dreamweavers. im seeing two types of codes in order to link a htlm file to a css sheet. one code is: <link rel="stylesheet" type="text/css" href="theme.css"> second code is: <link href="styel.css" rel="stylesheet" type="text/class" media="scree