Replace function for changing file endings

Hello,
I would like to replace the following file endings into *.TRC:
my_first.ERR
my_second.err
my_third.ERR
my_fourth.ERR
my_fifth.err
But, I am getting the following:
my_first.TRC
my_second.err
my_third.TRC
my_fourth.TRC
my_fifth.err
My sql statement
update errorlog a
set (err_file) =
(select replace(err_file,'.ERR','.TRC')
from errorlog b
where a.err_id = b.err_id);
The compiler does not like the follwing sql statement.
I am getting an ORA-00907: ... Error.
update errorlog a
set (UPPER(err_file)) =
(select replace(err_file,'.ERR','.TRC')
from errorlog b
where a.err_id = b.err_id);
Does anybody have an idea?
Best regards,
Tom Rakete

or something like.
SQL> select * from errorlog;
ERR_FILE
my_first.ERR
my_second.err
my_third.ERR
my_fourth.ERR
my_fifth.err
my_first.log
6 rows selected.
SQL> update errorlog
  2     set err_file = decode(substr(err_file,instr(err_file,'.',-1)),
  3                             '.err',substr(err_file,1,instr(err_file,'.',-1))||'TRC',
  4                             '.ERR',substr(err_file,1,instr(err_file,'.',-1))||'TRC',
  5                                    err_file);
6 rows updated.
SQL> select * from errorlog;
ERR_FILE
my_first.TRC
my_second.TRC
my_third.TRC
my_fourth.TRC
my_fifth.TRC
my_first.log
6 rows selected.
SQL>

Similar Messages

  • What's the utility to assign default apps for various file endings?

    A few months ago I found a utility that integrates assigning default apps for various file endings. Made it a lot easier, and more thorough, than picking one of each, opening the GET INFO window, assigning it and clicking "open all like this."
    But dang I can't recall the name. It was free or shareware. Seems like I read about it in MacWorld, but I haven't been able to come up with it via key word search. Help?
    Thanks,
    cb
    iMac Intel Duo Core; iBook G4; abacus   Mac OS X (10.4.9)  

    Is RCDefa
    ultApp what you're looking for?
    (22439)
    holy moley rocky roley!
    Yup, thassit.
    Thanks very much!
    iMac Intel Duo Core; iBook G4; abacus   Mac OS X (10.4.9)  

  • Does Logic Pro X include replacement functionality for Compressor, Soundtrack Pro and Waveburner from Logic Studio 9?

    Does Logic Pro X include replacement functionality for Compressor, Soundtrack Pro and Waveburner from Logic Studio 9?

    No..  You can buy the Compressor (along with Mainstage) via the App Store as a separate download but STP and Waveburner are discontinued products. Some of STP's functionality can now be found in Final Cut Pro X...
    Note: Mainstage, Compressor, Waveburner and STP were part of the full version of Logic Studio 2.0 (which also included Logic Pro 9 ) and sold for $999 compared to Logic Pro X which retails at $200...
    The Apple loops/Jam packs that came as part of Logic Studio 2.0 now come free with Logic Pro X (and did so with the Appe store version of Logic Pro 9) .. as part of the additional downlaod

  • UDF for Changing File Name

    Hi Experts,
    I am working on one scenrio, where i am fetching the file name dynamically by adapter module.
    Now, the file name needs to be checked for the following conditions:
    BOOKING_REF_DELIVERYNO_WB.pdf
    BOOKING_REF_DELIVERYNO_BOLCOPY.PDF
    DELIVERYNO_AWB.PDF
    Depending upon the type of file being picked up by PI from the mail box,following needs to be done:
    1.time stamp needs to be added ..
    ex..
    for file SO10162239_123_458_BOLCOPY.pdf--> the file name must be changed to :
    SO10162239_X2100_20101206_123_458_BOLCOPY.pdf.
    Please suggest if this can be done by graphical mapping ?
    Thanks,
    Sushama

    hi,
    I am using following UDF..
    FileName->ParseFile>getNykFilename>concat--
    Current date->                                                                   concat> Trim> FileName
                               concat----
    |
    constatnt[.pdf]--->
    UDF for parse file:
    String[] sarray;
    String regex = "\"";
    String retstring;
    String fname;
    int l= raw.length();
    try {
         sarray = raw.split(regex, 3);
         retstring = sarray[1];
                            fname=sarray[l-1];
            if( fname=="WB")
    raw.concat("_X2100_");
    else if (fname=="BOLCOPY")
    raw.concat("_X2101_");
    else if (fname=="AWB")
    raw.concat("_X2102_");
    } catch (Exception e) {
         retstring = "no_att_name_found.err";
    return retstring;
    UDF for getNykFileName:
    String[] sarray;
    String regex = "[_]";
    String retstring;
    if(!orgName.endsWith(".err")){
    try {
         sarray = orgName.split(regex, 3);
         retstring = sarray[0];
    } catch (Exception e) {
         retstring = "nyk_filename.err";
    return retstring;
    }else{
         return orgName;
    But, its not working..
    Its giving the file name as:
    no_att_name_found.err20101206 for the input file : 801243209_81473641_wb.pdf
    Display queue result for parsefileName:
    "no_att_name_found.err"
    Please suggest.
    Thanks,
    Suahama

  • Function for changing planned dates of activity

    How can I change planned dates of activity in code ?
    Is anyone familar with a bapi/function for this ?
    Thanks,
    Nitzan

    Hi Nitzan,
    Actually When you want to change planned date of the activity?
    If it is during the processing of the activity, you can do it by  two methods
    1)Either by using a call back function module configured in CRMV_EVENT transaction. In this function module read the date using CRM_order_READ FM to read ET_APPOINTMENT table.
    Then use CRM_ORDER_MAINTAIN to change to change the date.
    2) use the BADI order_save and implement the method  CHANGE_BEFORE_UPDATE and put the same logic.
    OR
    if you want to do it externally, use the BAPI BAPI_ACTIVITYCRM_CHANGEMULTI to change the activity dates.
    Regards,
    Annu Cyriac

  • Replace function for HTML tags

    Hie Guys,
    I would like to get rid of the HTML tags from a column/object in my report using the "Replace" function. Basically, I want to replace whatever the content is between "<" & ">" i.e. the opening and closing tags. I know I can use the "Pos" function to identify the position of "<" & ">", but I am not sure exactly how to achieve this in Webi. FYI -  "Read content as HTML" & "Read content as Hyperlink" did not resolve the issue. Can anyone please help? Thanks.

    Hi Jeewan,
    It will be very tedious to do this at Webi level.
    I have tried below example. It might help you to work around your issue; however, not completely:
    1. Created an Excel and inserted single value in first column as:
    <html><b>this is yuvraj</b></html>
    2. Used it as source and created a Webi report in Rich client.
    3. Applied SubStr recursively using Pos function and created below variables:
    test : =Substr([column_1]; Pos([column_1];">")+1;Length([column_1]))
    test1: =Substr([test]; Pos([test];">")+1;Length([test]))
    test2 : =Substr([test1]; 0;Pos([test1];"<")-1)
    The output has been attached.

  • Scan_to_disk replacement function for nidaqmx.h

    Hello,
         We are upgrading an old card to a PCI NI 6224 or 6225.  The old project was developed in C++ and used the nidaq.h header.  The new development will also be done using C++. 
    1)  Is there any documentation on how to use the nidaqmx.h file in C++?  If you could point me to it that would be great.
    2)  Using C++ as our base, would it be possible to use two 6224 cards instead of the 6225?  Is it still possible to synchronize the cards?
    3)
    I need to replace the old function Scan_to_disk with something that
    will do the same thing in the nidaqmx driver.  Is this function still
    realisable?  Is there a procedure out there somewhere?
    Thanks

    Sparckis,
    To help answer your questions.....
    1)  Is there any documentation on how to use the nidaqmx.h file in C++?  If you could point me to it that would be great.
    Using NI-DAQmx in Text Based Programming Environments
    For further information about using the functions in the DAQmx API, please refer to the NI-DAQmx C Reference Help located in the Windows start menu:
    Start » Programs » National Instruments » NI-DAQ
    2)  Using C++ as our base, would it be possible to use two 6224 cards instead of the 6225?  Is it still possible to synchronize the cards?
    Yes, you can use two cards in C++, you will just have separate tasks for each as you would in any language.  They can be synchronized by use of a RTSI cable.
    3) I need to replace the old function Scan_to_disk with something that will do the same thing in the nidaqmx driver.  Is this function still realisable?  Is there a procedure out there somewhere?
    Old Forum on Issue
    What are the Terminology Changes in NI-DAQmx?
    Alex A.
    Applications Engineer

  • MDM parameter replacement values for Change Tracking

    Hi! I am able to set up the Change Tracking function and able to view the data via web and Data Manager. On reading the Help documentation on the set up for Data Manager, it mentioned about the parameters which we can use to get dynamic value from Data Manager for the specific record (for the set up of the link URL).
    Does anyone know what parameter replacement value that would be if we want the system to assign the record number base on the record we select?
    Below is any extract of the help document on the search record:
    searchrecord [optional]
    The record for which history records are initially displayed
    The searchtable and searchrecord parameters can get dynamic values from the Data Manager at runtime by using the relevant MDM parameter replacement values.
    Appreciate any help on the above.
    Thanks!
    SF

    Hi,
    Check the below link
    http://help.sap.com/saphelp_mdm550/helpdata/en/8e/9f9c427055c66ae10000000a155106/frameset.htm
    Repository Maintainance -> Repository Structure Operations -> Other System Tables -> Links Table -> URL syntax
    Regards,
    Jitesh Talreja

  • Search/replace function for Lightroom?

    I am trying to find out if there is a way of finding and replacing certain text in the metadata in a quick and easy way. I need to change something on all my photos in LR. Can anyone help me? Thanks a lot in advance.

    Rob,
    Thanks for response.
    I understand that Lightroom has a  SDK for plugins and this is a really good thing as it does allows others to tweak and enhance functionality without relying on Adobe. I have been a user of Lightroom  since the very first user trials and think it is a great product. I have watched it develop over the last 5 or 6 years.
    I do think it is more than just an image editor. Lightroom has always been promoted since day one as a new and better image database and workflow management tool. It is for this reason that question why Adobe has not closed some (I think) gaps in functionality consistent with Lightroom fullfilling its purpose as an Image library/Database management tool. It has certainly had the search capabilities included since day one of all metadata, consistent with a management tool.
    For the work I have been doing lately, Search and replace would be useful as I have been cleaning up metadata in various libraries. Hence while I agree it is not used every day, it would be a very useful maintenance tool.
    I thought I had posted this originally as a response to a similra request in the Lightroom Feature request forum, apparently not. I did try (today) to start a new feature request  but I was blocked from starting new threads in that sub-forum. Hopefully someone else with access to that forum will pick up on this and transfer the request to the Feature Request forum.

  • Error in User defined function for dynamic file naming

    Hi,
    While creating User Defined function with this following code for dynamic fieldname
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return ourSourceFileName;
    which options should i select for cache Value, Context, Queue
    for Augument , what name shd i mention.
    Regards,
    Varun

    Hi Varun,
    I guess I have answered a similar question just a few minutes before on very similar post from you. Just pasting the same here .................
    Are you trying to access the ASMA values from the SOAP header of the XI message for the source file name?
    First of all you need to Set the Sender File Adapter for Set ASMA and then file name. So it will work fine when you actually run the scenario end to end.
    But in the mapping tool when you test the mapping - there is not message header updated with the actual source filename - and whenever you try to read the FileName attribute in the message header from the UDF - it cannot find the object and returns a NullPointerException.
    I would suuggest for your mapping tool testing to be successful, have a check in the java code for null values,
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    If (ourSourceFileName != null)
       Return ourSourceFileName;
    Return "NoFileName.txt";
    Let us know if this works.
    Regards,
    Suddha

  • Infopackage routine for changing  file name

    Hi Everyone,
                               I have to load flat files from application server directories. I get these files from different locations and they are saved in own (location) folders by a script). I would like to run these file from infopackage through process chain. the problem is that these files have changing names. The format is like this
    Canada_co3300.csv
    I can write a routine is my infopackage but  "co3300" keeps changing as it represents different companies code in that particular location (Canada).
      I have a routine
    data: F1 type string value 'D:\usr\sap\FLAT_FILES\Inbound\Cayman\Canada_<b>co3300</b>_',
    F2 type string '.csv'.
    concatenate f1 f2 into p_filename.
      How can I get a variable <b>co</b>---- in my routine so my infopackage can read the file if <b>co</b> has different value like co2000. Thanks In advance.
    Regards,
    Asad

    Hi Saugata,
                           My flat file name has a naming convention based on company code in application server folder, so I get files with name
                                               Canadaco<b>3000</b>.csv  or
                                               Canadaco<b>2000</b>.csv or
                                               Canadaco<b>4000</b>.csv or something else <b>(co</b> number keeps changing)
    So My file name keeps changing all the time. I would like my infopackage to read these files automatically thorugh a routine or logical file name. I have tried both, but donot know how to configure this scenerio thorugh my infopackage. Please give me steps to use that table you mentioned. Thanks .

  • Replace function for CLOB

    I have CLOB column and want to do a select with a replace kind of function- replacing certain characters. E.g. if body is a CLOB field, I need
    select Clobreplace(body,'abcdef','123456') from t1;
    Does anyone have a function or equivalent to do this?
    Thanks

    There isn't one readymade. However, it would be relatively simple to write one yourself. You would need to iterate around the input clob doing the following:[list]
    [*]use DBMS_LOB.INSTR to locate occurances of the token;
    [*]use DBMS_LOB.SUBSTR to segment your input CLOB using the offset from the INSTR call;
    [*]write each segment appended with the replacement string to a temporary LOB;
    [*]return the temporary LOB
    [list]
    I suggest you have a play around with the logic of this using SQL SUBSTR and INSTR on a varchar2 string. Once you understand what you're doing you can introduce the complication of operating on a CLOB.
    Good luck, APC

  • [SOLVED]Gui for changing file associations

    hello everyone!
    i use openbox as WM, thunar as my filebrowser and chromium as my webbrowser.
    i ran into the following issue:
    everytime i download something with chrome and click on the entry displayed on the bottom it mostly does not do anything. but i found out that it queries
    xdg-open
    which then reads
    ~/.local/share/applications/defaults.list
    which seems very logical to mee since this is a very centralized approach in opening files. this way thunar and chrome use the same apps. but it seems pretty cumbersome to me to type every file-type into this file.
    i found out that thunar is able to add entries into this file by selecting an application manually to always use this application for this kind of file.
    but is there any way that i can select file-roller for example for ALL archives and add ALL those entries into defaults.list? or all media-files to be opened with vlc since this is my only media-player anyway. thunar is not the issue here but chrome is :-)
    i know that ubuntu-tweak has got something in this direction but this does not work on arch :-(
    so is there any gui or something that allows me to populate defaults.list in an easy manner?
    thanks in advance!
    Last edited by Labello (2010-08-08 14:04:58)

    Sorry for the hassle.
    I found a solution and added it to the OpenBox-article in the wiki:
    http://wiki.archlinux.org/index.php/Ope … sociations

  • What is the best cheap/free search and replace software for .xml files?

    Transferring my iTunes library from PC to Mac I have reached the stage where I want to edit the .xml file from PC file paths to Mac ones - which would be the best preferrably free software to do this on?

    Perhaps my comment in your other thread will help.
    tt2
    PS I don't know about the Mac, but Notepad++ will probably do your search & replace on the PC if you have to edit the XML.
    Message was edited by: turingtest2

  • HT1222 When I try to install iTunes 10.7 it says it can't find the iTune64.msi file. I can't seem to find a replacement download for that file.

    I have ITunes installed on my PC which runs Windows Vista in support of my IPad.  When I try to install the update for ITunes 10.7 version, it says it can't find the "itunes64.msi" file.  How do I correct this, or where can I find a download for the itunes64.msi file?

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get aCode 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

Maybe you are looking for

  • Problem with SelectBooleanCheckbox

    I'm a beginner with JSF. Trying to get a form working that uses checkboxes (among other things). I have the following column entry in an jspDataTable: <h:form> <h:dataTable value="#{fnc.objVector}" var="fnc" first="#{fnc.startIndex}" rows="2"> <f:fac

  • How to make my exported movie bigger?

    When I export my finished project as a QuickTime, the video canvas becomes REALLY small for some reason. Also, there is a huge black border around the entire video. Is there a format that will prevent that?

  • Compaq 8510p HDMI connection to Plasma - no sound

    I'm attempting to connect my Compaq 8510p to my Panasonic Plasma TV via HDMI cable and I'm getting video by no sound. I have rebooted the Laptop with the HDMI cable attached and that doesn't solve the problem.  I have a SoundMAX HD sound card and dig

  • Error starting component: oracle instance: instance 1 (coreapplication)

    Hi, Mu OBIEE core application can't start anymore. I encounter this problem on OBIEE after restoring the database: Message     Error in starting component: oracle instance: instance1, component: coreapplication_obis1 Details oracle.bi.management.bido

  • Quiz scoring incorrect

    Hi A user has taken a quiz in a course. He failed the first time and so he did it again this time getting 100% of the questions correct. On his score page though it shows he has passed with a score of 88%. Is it taking his first attempt into account?