help me on how to update values with certain condition?

Hello..

I have data like below: -.

Select the nv2_audit_log qualifier where the qualifier like '% NXPRI % NXUPM % ';

/ CRCA/nv2am/Data/Input/NXPRI/NXUPM. P691011_691110
/ CRCA/nv2am/Data/Input/NXPRI/NXUPM. P691011_691110
/ CRCA/nv2am/Data/Input/NXPRI/NXUPM. P691011_691110
/ CRCA/nv2am/Data/Input/NXPRI/NXUPM. P691011_691110
/ CRCA/nv2am/Data/Input/NXPRI/NXUPM. P691011_691110
/ CRCA/nv2am/Data/Input/NXPRI/NXUPM. P691811_691910
/ CRCA/nv2am/Data/Input/NXPRI/NXUPM. P691811_691910
/ CRCA/nv2am/Data/Input/NXPRI/NXUPM. P691811_691910
/ CRCA/nv2am/Data/Input/NXPRI/NXUPM. P691811_691910


The question is how could I update all the qualifier of
/ CRCA/nv2am/Data/Input/NXPRI/NXUPM. P691811_691910 to/crca/nv2am/data/input/NXUPM/NXUPM. P691811_691910 where the qualifier like '% NXPRI % NXUPM % '? Could someone help me?

In fact I want to change the NXPRI to be NXUPM only for all recording with the qualifier like '% NXPRI % NXUPM % '.

The output should be like this: -.
/ CRCA/nv2am/Data/Input/NXUPM/NXUPM. P691011_691110
/ CRCA/nv2am/Data/Input/NXUPM/NXUPM. P691011_691110
/ CRCA/nv2am/Data/Input/NXUPM/NXUPM. P691011_691110
/ CRCA/nv2am/Data/Input/NXUPM/NXUPM. P691011_691110
/ CRCA/nv2am/Data/Input/NXUPM/NXUPM. P691011_691110
/ CRCA/nv2am/Data/Input/NXUPM/NXUPM. P691811_691910
/ CRCA/nv2am/Data/Input/NXUPM/NXUPM. P691811_691910
/ CRCA/nv2am/Data/Input/NXUPM/NXUPM. P691811_691910
/ CRCA/nv2am/Data/Input/NXUPM/NXUPM. P691811_691910


Thank you
balleur

Hello

Use the update statement.

Update
nv2_audit_log
Set
qualifier = replace(qualifier,'NXPRI','NXUPM')
Where
qualifier like '% NXPRI % NXUPM % ';

I hope this helps!

Kind regards
Rajesh.

Tags: Database

Similar Questions

  • How to pass value with room settings using URLs GO

    Hi all

    I use GO url to a report that comes from a different domain. I used is invited and all in the target report. All valuses come in the report target with filtered according to the recording of line condition. But what value is to have a sound space creating problem and showing instead of the entire report of the same rank value. How to solve this problem. Is there any format pass parameter that can ve a value with a space between the two.

    Once again, when I go to the report target with GO url link his watch not download or link back. Can help in this regard too

    Thank you

    Put a Replace function...

    '||' Click to see the ingredient details | »

  • How to update columns with the value of other lines in the same table

    Hello

    I use Oracle 11.2, I'd use SQL statements to update a column based on values in other rows in the same table. Here are the details:

    create table TB_test (number 4 myId, crtTs date, date of MDPU);

    insert into tb_test (1, to_date ('20110101', 'YYYYMMDD'), null);
    insert into tb_test (1, to_date ('20110201', 'YYYYMMDD'), null);
    insert into tb_test (1, to_date ('20110301', 'YYYYMMDD'), null);
    insert into tb_test (2, to_date ('20110901', 'YYYYMMDD'), null);
    insert into tb_test (2, to_date ('20110902', 'YYYYMMDD'), null);

    After you run the SQL code, I would like to have the following result:

    1, 20110101, 20110201
    1, 20110201, 20110301
    1, 20110301, null
    2, 20110901, 20110902
    2, 20110902, null

    Thanks for your suggestion.

    I guess you need this, otherwise please explain logic correctly:

    SQL> merge into tb_test t
      2  using (
      3    select rowid as rid
      4         , lead(crtts) over(partition by myid order by crtts) as updts
      5    from tb_test
      6  ) v
      7  on (t.rowid = v.rid)
      8  when matched then update
      9   set t.updts = v.updts
     10  ;
    
    5 rows merged.
    
    SQL> select * from tb_test order by 1,2;
    
          MYID CRTTS     UPDTS
    ---------- --------- ---------
             1 01-JAN-11 01-FEB-11
             1 01-FEB-11 01-MAR-11
             1 01-MAR-11
             2 01-SEP-11 02-SEP-11
             2 02-SEP-11
    
  • How to store values with more than 50 KB

    Hi all

    I need to print some records in a single invoice lines line some pre-required data, I went into the loop and they stored in a variable as


    file: = | LINE1. Line2;


    This logic works very well until the characters are less than 32 k, but beyond that, it gives an error, how can I store the values larger than this size? any advice would be very helpful.


    Thanks in advance


    Thank you
    Pratap
    declare
      myClob clob;
      myVar varchar2(1000) := rpad('x',1000,'x');
    begin
      for i in 1..100
      loop
        myClob := myClob || myVar;
      end loop;
      dbms_output.put_line('Lenght of clob is ' || length(myClob));
    end;
    
  • How to update when the defined condition is to find using the join

    Hello everyone
    I want to update a column of the table, and the value can be found using another table
    then, how should I update using the join in the set condition
    Suppose there are 2 tables and 5 column are frequent at home
    Now, I want to update a column by using join conditions

    Suppose that
    select a.column5
    from table_1 a, table b
    Where a.col1=b.col1
    and a.col2=b.col2
        .
        .
        .
    and a.col8=1000000002
    It's the Party join now I want to use guess a.column5 in the fixed part of the update
    update b
    set b.col5= a.col5

    You must use your pk in the query.

    update table b
    set b.col5= (select a.column5
                              from table_1 a
                          Where b. = a.whatever
    

    This problem is with your query logic... read it again.

  • How can I activate under certain conditions a timed pulse?

    Hello

    I need to repeatedly pass a system to test.  To do this, I need to take six switches entry.  When they are all active, I need to generate a digital high about 1 second in time to restart the cycle.  I have to do this 1000 times.

    I have a loop that displays a True value when the six input switches are closed.  The problem is to get that signal to generate a second pulse on my DAQ and increment a counter of some sort.

    Once more, a task that you could train a chimpanzee to do in five minutes takes me hours to understand in LabView.

    Running LabView 8.6 with one NOR cDAQ-9172.  Digital NI 9423, output digital input module is a NI 9472.

    Since you have already a Boolean output, simple solution like just this wiring up an instruction box with the DAQmx written inside. Because the module is timed, you write a logic, a software, wait and then write a logic 0.

    If the simple solution below is not what you need, please provide details. Join your code would help.

  • Passing the value with coma inside to another page

    Hi all, need your help.

    I have trouble to clarify how to pass value with coma to another page.

    For example, I have a P2_NAME field: with the current value: Test, name

    When I'm passing this on page 3 I get only from Test. I do not understand why, but I do not know how to deceive the APEX?

    var url = ' f? p = & APP_ID.:3: & SESSION.: NO::P2_NAME: "+ $v ('P3_NAME');

    Window.Open (url, "name", "height = 600, width = 800, toolbar = no, directories = no, status = no, menubar = no, scrollbars = no, resizable = no, modal = yes");

    Thank you very much

    Andrei

    Hello

    This might help

    2.5 understanding URL syntax

    List of values of the element used to define the session state in a URL.

    Item values cannot include settlers, but may contain commas with backslashes.

    To change a comma in a value element, place the characters with the backslashes. For example:

    \123,45\

    Kind regards
    Jari

  • How to replace "apply downloaded update now" with "Check for Updates" in the menu help when the update fails because the downloaded update files are missing but the "Ready to install update" window keeps appearing?

    Question

    I have another type of problem with Firefox

    Description

    Window "Ready to Install" Firefox "Software Update" appeared. The folder "C:\Program Files\Mozilla Firefox\updates\0" contained the files update.mar, update.status and update.version. Each of the 3 files have been deleted. The next time that Firefox has been started, no update occurred because update files were missing. In the Menu bar, clicking Help showed in the menu drop-down that "apply downloaded update now" was always on the list. By clicking on "Apply downloaded update now" open "Software Update" window "Ready to install update", so that Firefox still considers that the update files exist, but they do not. In the window "Software Update", by clicking on "Restart Firefox" restart of Firefox, but once again it there's no update, and remains "apply downloaded update now" on the Help menu. How can "Apply downloaded update now" be replaced by "Check for Updates" so the update files can be downloaded?

    Version of Firefox

    3.6.3

    Operating system

    Windows XP

    User Agent

    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; RV:1.9.2.3) Gecko/20100401 Firefox/3.6.3

    Plugins installed

    • npmnqmp - 989898989877
    • NP-mswmp
    • Adobe PDF plugin for Firefox and Netscape "9.3.2.
    • Default plugin
    • Foxit Reader plugin for Firefox and Netscape
    • Shockwave Flash 10.0 r45
    • Version 1.0.3 copyright 1996-2009 The VideoLAN Teamhttp: / /www.videolan.org/

    You can manually reset the software update feature by closing Firefox and remove the file "updates" (which seems you have done) and the two files "active - update.xml" and "updates.xml" - these are in the installation (C:\Program Files\Mozilla Firefox) directory or in the profile folder (C:\Documents and Settings\nom_utilisateur\Application Data\Mozilla\Firefox\Profiles\something.default).

    If it does not, see our KB article How to resolve the failure of the update of Firefox update error message - the section of 'last resort' can be useful, or or read this article from MozillaZine KB, software update.

    Please let us know how the above work, and if we can be of further assistance.

  • Please help me understand how to install updates with the following error updated Message__The following have not been installed: __Security update for Microsoft XP KB 2289162

    Please help me understand how to install updates with the following error Message

    The following updates were not installed:

    Security for Microsoft XP KB 2289162 update

    See the section "How to get help" of http://support.microsoft.com/kb/2289162

    For individuals, please visit the Microsoft Solution Center and antivirus security for resources and tools to keep your PC safe and healthy.  If you have problems with the installation of the update itself, visit the Microsoft Update Support for resources and tools to keep your PC updated with the latest updates.

    Buying to meet problems installing Microsoft security updates also can visit the following page for assistance: https://consumersecuritysupport.microsoft.com/

    ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • Need help writing an update / insert with linked tables

    I am new to ColdFusion. I am learning to write querys and creates a small application to collect information from visitors to my web site. (It's also a good way for me to learn this language) I'm having a problem and it is not only the way to use an update / insert with related tables. I don't know if I'm still gather the appropriate variables to compare them to existing DB records until his execution is the update or insert some querys. Can someone help me, show me how can I update / insert related tables and maybe tell me if I create the varibales good to the compairison? This is my code, I commented out.

    <! - creating a variable to compare with the db table - >
    < cfset userIP = ('#CGI.) REMOTE_ADDR #') >

    <! - run the query and compare the cfset cell remote_addr - >
    < name cfquery = 'userTracking' datasource = "" #APPLICATION.dataSource # "dbtype ="ODBC">"
    SELECT REMOTE_ADDR
    Of user_track
    WHERE REMOTE_ADDR = #userIP #.
    < / cfquery >

    <!-if the record exists, then run this update-->
    < cfif userTracking EQ userIP >
    < cfquery datasource = "#APPLICATION.dataSource #" >
    UPDATED user_track, trackDetail
    SET user_track. REMOTE_ADDR = < cfqueryparam value = '#Trim (CGI.' ' REMOTE_ADDR) # "cfsqltype ="CF_SQL_VARCHAR">.
    user_track. Browser = < cfqueryparam value = '#Trim (CGI.' "HTTP_USER_AGENT) #" cfsqltype = "CF_SQL_VARCHAR" >.
    user_track.visits = visits + 1,
    trackDetail.date = < cfqueryparam value = "#Now ()" # "cfsqltype ="CF_SQL_TIMESTAMP">,"
    trackDetail.path = < cfqueryparam value = "#Trim (PATH_INFO)" # "cfsqltype ="CF_SQL_LONGVARCHAR">"
    WHERE REMOTE_ADDR = < cfqueryparam value = '#Trim (CGI.' ' REMOTE_ADDR) # "cfsqltype ="CF_SQL_VARCHAR">
    < / cfquery >
    < cfelse >

    <! - if it isn't, then insert a new record-->
    < datasource = "" #APPLICATION.dataSource # cfquery "dbtype ="ODBC">"
    INSERT INTO user_track, trackDetail
    (user_track. REMOTE_ADDR, user_track.browser, user_track.visits, trackDetail.userID, trackDetail.date, trackDetail.path)
    VALUES)
    < cfqueryparam value = '#Trim (CGI.' ' REMOTE_ADDR) # "cfsqltype ="CF_SQL_VARCHAR">.
    < Len (Trim (HTTP_USER_AGENT)) GT 1 cfif >
    < cfqueryparam value = '#Trim (CGI.' "HTTP_USER_AGENT) #" cfsqltype = "CF_SQL_VARCHAR" >.
    < / cfif >
    visits + 1,
    < cfqueryparam value = '#Trim (CGI.' "HTTP_USER_AGENT) #" cfsqltype = "CF_SQL_VARCHAR" >.
    < cfqueryparam value = "" #user_track.userID # "cfsqltype ="CF_SQL_VARCHAR">,"
    < cfqueryparam value = "#Now ()" # "cfsqltype ="CF_SQL_TIMESTAMP">,"
    < cfqueryparam value = "#Trim (PATH_INFO)" # "cfsqltype ="CF_SQL_LONGVARCHAR">"
    )
    < / cfquery >
    < / cfif >


    I'm close on this? This throws any errors, but it is not no longer works. It is so obviously wrong. I get a cfdump the end of my query of compairison, but once it hits the stated case, it is lost.

    Thanks for your time no matter who.

    Newbie

    You must define the variable before you can use it.  You try to use it on line 1 of your model.

  • How to get the updated values of the loops while they are running

    Hello

    I am trouble with a very basic problem, how to access the updated values of the "loop FOR" during operation?  Basically, the VI I is currently working on two sub vis calls each sub VI has a loop for, and the two screws may or may not work for the same number of iterations. My goal is to read the values in each terminal within the loop of two sub VIs, in primary VI. I tried to do this using Global Variables, but in main VI it will display only the last iteration of the two value sub live. Could someone please tell me whrere I go wrong? Is there any other/better way to do this.

    I appreciate any input on this issue.  

    Pass a reference of the main VI control to the Sub screws.  See attached example.

  • How to compare the new values with the old values in triggers.

    Dear all,

    Please tell me how to compare the new values with the old values in triggers.

    Hi, the employee example is in the document. You'd better read yourself.

    CREATE OR REPLACE TRIGGER Print_salary_changes
      BEFORE DELETE OR INSERT OR UPDATE ON Emp_tab
      FOR EACH ROW
    WHEN (new.Empno > 0)
    DECLARE
        sal_diff number;
    BEGIN
        sal_diff  := :new.sal  - :old.sal;
        dbms_output.put('Old salary: ' || :old.sal);
        dbms_output.put('  New salary: ' || :new.sal);
        dbms_output.put_line('  Difference ' || sal_diff);
    END;
    /
    
  • How do update you the "cloud-copy" of bookmarks in sync-ed, etc. (assuming that 'sync' only allows you to synchronize your device with the cloud

    The machine used for the first set up a sync account seems to provide the cloud 'Captain' at the time of installation. Subsequent operations 'sync now' any device seem to download this cloud 'master' on the devices. But how to update the 'master' cloud and it can be done (transferred to) by the device of your choice?

    Hi Igbortaz,
    This ONLY happens when you join the account the first device. After that, all devices connected to the account synchronization and merge with the stored then replaces the local profile. Unfortunately, at the moment it doesn't have a function to choose the device that is the master.

    And before any changes, I recommend you make a backup of your profile.

  • Could someone help tell me how can I save 100 to 200 equidistant values of a particular number % 3F

    Could someone help me that how can I save 100 to 200 in labview at equal distance from the values of a particular number? Lets assume that I have a number of 50 and I need 100-200 equidistant values between 0 and 50. I made a sample program, but it gives error of memory storage that I did not understand how to solve...

    You make the mistake to make equal comparisons on numbers floating point. It's very dangerous. Most likely, your VI will never stop until the computer is out of memory. Replace the 'equal' by ' greater than or equal to "and you should be OK.

    As you know the number of iterations in advance, you must use a loop FOR, see how far you get. In addition, your shift register must probably be initialized.

    (Of course, it is also 'ramp model' If you want a canned solution. )

  • How can I compare unique value with several value...

    Hello

    I want to compare a value with multiple values, how is it possible?

    I tried to design the same logic here as an attachment, but I had the problem that when I entered the value of y that is compared with only a minimum value of x, I don't want I want to compare the value of y with the value of x and then if y is less than x while loop should be stop.

    I want to do because in my program some time I have not result I want, for example, the values of x is 4,5,6,7,8 and value is assumed to be 6 then while loop should be stop but here he considers only less and its 4 here so so that the loop is not stop even there is less then 7 and 8. So I want to compare the value of y with all values of x and if y is less then one of the values while x loop should be stop and led should be on.

    Please guide me how I can do...

    I don't understand?  If there is less than the minimum value of X then it is less than all values of X.  That's what I do anyway:

Maybe you are looking for