need an effective way to

Hi Expert,

I have established a procedure to save a file, say p_save (number of i_id, i_name varchar2, i_text varchar2 (20)) to tbl1.  Logic to record is

IF no registration tbl1.id > i_id for same i_name THEN NULL - fail

If NOT remove tbl1 where id < i_id and name = i_name; --(supprimer tous les vieux dossier et insérer un nouveau)

insert into tbl1 (i_id, i_name, i_text) values;

AT THE END:

Could you please let me know what would be the most effective way to achieve this?  Perhaps with a merger or other similar means.

Thank you.

Thank you kendenny. good point, I think that we should not delete.  That's what I did:

  PROCEDURE sp_save (i_id      IN NUMBER, l_name In varchar2
                          i_text          IN VARCHAR2)
  IS
      l_id    NUMBER  --local variable
  BEGIN
      SELECT  id
        INTO    l_id
        FROM  tbl1
      WHERE  name = l_name;

     IF l_id < i_id
      THEN
        UPDATE  tbl1
            SET  id= i_id, text= i_text
          WHERE  id = l_id  AND name= i_name;
      END IF;

  EXCEPTION
      WHEN NO_DATA_FOUND
      THEN
        INSERT INTO  tbl1
              VALUES  (i_id,
                        i_name,
                        i_text);
END;

Let me know if we can do better.

Tags: Database

Similar Questions

  • Effective way to draw a selected graphic user

    Hello

    I channel data acquisition "n" and I need to graph data, but the channel is selected by the user. For channel 1, channel 2 or it can for example select channel 1 and 2. I have a solution to what use cases multiple structures which I know is not the best way to do it. Is there an effective way to do it. Can someone tell me a knowledge base

    I have attached the jpg to know how I do this.

    Thanks in advance

    Nitin

    You also have the visibility available field box when you view the legend of the plot. It's also can be defined by a property node.

  • The most effective way to log data and read simultaneously (DAQmx, PDM) high data rates

    Hello
     
    I want to acquire the data of several Modules cDAQ using several chassis to
    high data rates (100 k samples per second if possible). Let's say the measurement time is 10 minutes and we got a large number of channels (40 for example). The measured data is written to a PDM file. I guess, the memory or the HARD disk speed is the limits. For the user, there must be a possibility to view the selection of channels in a graph during the measurement.

    My question: what is the best and most effective way to save and read data at the same time?

    First of all, I use an architecture of producer-consumer and I don't want to write and display the data in the same loop. I expect two possibilities:

    [1] to use the 'DAQmx configure logging.vi' with the operation 'journal and read' to write the data to a PDM file. To display the data in a second loop, I would create a DVR samples documented and 'sent' the DVR for the second loop, where the data will be displayed in a graph (data value reference). This method has the disadvantage that the data of all channels is copied into memory. Correct me if I'm wrong.

    [2] use 'DAQmx configure logging.vi', but only with the "journal" operation to write the data to a PDM file. To view the selected data, I had read a number of samples of the TDMS file in the second loop (I'm currently writing the TDMS file). In this case, I have only one copy data from the selected channels (not), but there will be more HARD drive accesses necessary.

    What is the most effective and efficient solution in this case?

    Are there ways to connect and read data with high frequencies of sampling?

    Thank you for your help.

    You say that the measurement time is 10 minutes. If you have 40 channels and you enjoy all CHs at 100 kHz, it is quite a number of values.

    In this case, I always try to approach under the conditions of use. If a measure is only 10 minutes, I just connect all PDM data and create a graphic module that could be in the same loop of consumers where connect you the data. You can always work on the raw data files big offline afterwards, the extraction of all the information you need (have a look at the product called NI DIAdem: http://www.ni.com/diadem/)

    The main issue is that the user needs to see in the graph (or perhaps a chart can be useful too). Lets say that the graph is 1024 pixels wide. It makes no sense to show multiple data to 1024 points, Yes? Every second will produce you 100 data points k per channel. What is the useful information, which should see your username? It depends on the application. In similar cases, I usually use some kind of data reduction method: I use a moving average (Point by point Mean.VI for example) with a size of the interval of 100. This way you get 100 data points of 1000 per channel every second. If you feed your graph every second with these average values, it will be able to data points in 1024 of the store (as a default) by channel (curve), which is a little more than 10 minutes, so that the user will see the entire measurement.

    So it depends on the frequency at which you send data to the consumer. For example, collect you values 1024 by iteration of the producer and send it to the consumer. Here you can make a normal means calc or a bearing (according to your needs) and he draw a graphic. This way your chart will display only the values of the last 10 seconds...

    Once I programmed some kind of module where I use a chart and not a graph, and the user can specify the interval of the absolute timestamp that is traced. If the data size is larger than the size of the chart in pixels, the module performs an average calculation in order to reduce the number of data points. Of course, if you need to see the raw data, you can specify an interval that is small. It all depends on how you program zoom functions, etc... In my case I hade a rate of 1 Hz, so I just kept all data in RAM limiting the berries to keep 24 hours of data, so that technicians could monitor the system. In your case, given the enormous amount of data, only a file read/write approach can work, if you really need access to all of the RAW data on the fly. But I hope that the values of working capital means will be enough?

  • Please tell us about what discounts may be available in the next few days OR the most cost-effective way, I can buy LR etc... I'm a NY State official working for a school... am nurse... am a part time student...

    Could you please tell? I did the 30 day trial there just in time for INTERNET services to plant so I could only use it about 4 times before the loss of a few months... Verizon internet is back on... I need the most cost-effective way to buy LR I think...

    The price on Adobe.com does not change, it's $ 9.99 per moth (it must undertake to pay for 12 months), or outright purchase at $149.

    If you think there could be some sales of other providers, you would have to do the research yourself.

  • The most effective way to browse the similar named fields?

    Hello

    I have a 5-page document on every page that contains appx. 50 similarly named fields.    For example Viol1Num, Viol2Num, Vio3Num...  Viol50Num.

    I'm looking for an effective way to program a loop to watch each field in Javascript, I can do some manipulations in these areas on what the user has entered.

    In FormCalc, I've used the 'foreach' function similar to:

    foreach (Field1, Field2, Field3 Field50)

    "BLAH".

    ENDFOR

    However, who gets really long especially when it comes to the following pages, where I have to start adding "topmostSubform.Page2." in front of each domain name so that I can access it from the first page, all fields on the following pages.  Also, I need to do it in Javascript, no FormCalc.

    For example, in JS, I use this loop to mark all fields read-only:

    
    
    
        
    for (var nPageCount = 0; nPageCount < xfa.host.numPages; nPageCount++) {
    
    
       
    
     var oFields = xfa.layout.pageContent(nPageCount, "field");
    
    
       
    
     var nNodesLength = oFields.length;
    
    
       
    
     for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) {
    
    
       
    
    
     oFields.item(nNodeCount).access = "readOnly";
    
    
       
    
     }
    
    
       
     }
    
    
    
    

    How could I do something similar to that for I can browse each field and perform actions on it without having to list every single domain name?

    I tried to change to watch the fields instead of field properties, but I couldn't run.

    Thank you.

    I solved my problem.   It took a few fighting in javascript using xfa.resolveNode.

    I have 5 pages, each consisting of a series of 60 fields named Viol1Num, Viol2Num, Viol3Num... Viol60Num.

    If when the javascript is executed, it detects an empty field, then insert a '3' in it.

    Here it is the javascript code that runs to the second page of this document.

       While (LoopCounter< 61)="" {="">
       If ((LoopCounter! = 21) & (LoopCounter! = 22)) {}
       If ((xfa.resolveNode("topmostSubform.Page2.Viol"_+_LoopCounter_+_"Num").rawValue == null) |) ((xfa.resolveNode("topmostSubform.Page2.Viol"_+_LoopCounter_+_"Num").rawValue == "")) {
       xfa.resolveNode("topmostSubform.Page2.Viol"_+_LoopCounter_+_"Num").rawValue = 3;
       }
       }
       LoopCounter = LoopCounter + 1
       }
  • Is there a more effective way to interrogate this cache?

    I have an interesting dilemma that I don't know how to fix. I have a cache of objects ClientType (see below). I'm trying to find the CustomerGroups that contain a password key for the customerValues card, which also have a CustomerValue.value between a high and low value. In others, do me all the CustomerGroups who have a client of "101" code, which contains a CustomerValue between 50 and 250. I have this fine work to aid request a customer filter - but the problem I have is that the cache contains approximately 500,000 items. The research must be applied to all objects, and because most of the clients contain a customervalue - we end up deserialization of objects to perform the comparison of the value in the cache that fills the eden space so quickly (in a multi-threaded env) that we are to throw himself into the holder space. This causes performance issues because it weakens the large global catalogs. We use 3.5.2 consistency and all are active POF. The works of current query - I'm looking for the most effective way to do with respect to the use of time and lot. I am willing to trade increased Rightsizing memory use for best performance - which means the addition of index / improves the news is very good. The big problem is fill the eden space so quickly. Any ideas?
    class CustomerGroup
    {
        Set<Customer> customers ;
    }
     
    class Customer
    {
        Map<Integer, CustumerValue> customerValues;
    }
    
    class CustomerValue
    {
      private int value ;
      private boolean isNew ;
    }

    Simi74 wrote:
    Robert - appreciate the help. The question I have for this juicer is that the price is related to a specific customer. For example:

    ClientType contains 1 client.

    This customer has 2 CustomerValues in his card.

    These entries to resemble the following:

    Key: 100
    Value: CustomerValue.value = 10
    
    Key: 200
    Value: CustomerValue.value = 50
    

    If I'm following your logic, the extractor that you recommended would apply to values (that is to say, 10, and 50). So, if I searched for CustomerGroups that have values between 5 and 15,
    return the ClientType as one of the values is 10. However, I also this map to a specific client code (in this case either 100 or 200 - they key in the matching values). Thus, the query is really more like 'give me all the objects ClientType to 100 client code where the value is between 5 and 15'. I should only get this object if the client code is 100. I can't do a ContainsFilter with the client code and use BetweenFilter because using an AllFilter since this logic would be tantamount to a 'false' positive press 200. Logical in this case being 'the ClientType contains a 200 client' who is true and does the ClientType contain a value between 5 and 15, which is also true, because the value list has 10 and 50. But it must return this object ONLY if the customer key passed is 100. The example below is a false positive.

    /* following code returns the object, but should not! */
    Filter[] filterArray = { new ContainsFilter( new CustomerKeyExtractor(), new Integer( 200 ) ),
    new BetweenFilter( new CustomerValueExtractor(), 5, 15) };
    
    Filter filter = new AllFilter( filterArray ) ; 
    

    So my question is how to apply a hint on the CustomerKey/CustomerValue as a whole without deserialize all the objects for each search? Or is it a problem with the structuring of the object? If that's the problem - of recommendations on alterations are welcome as well fix this filtering.

    Ah, ok, got it now...

    What is the client code?

    Is it just a key generated with an arbitrary value, or is it a thing of enum type (key to a value of metadata property with only a finite number of different property names, etc.) with only a small number of different codes in all of the cache?

    If it's a thing of enum type, then instead to extract only the 'value' s as integers, you can extract pairs ' value: code "represented as long with the code being the high 32 bit which would be always classifiable and allow querying: instead of valueMin and valueMax, you would code: valueMin and code: valueMax as the beach.

    If it's an arbitrary generated value, then it is a bit more problematic (extraction POF does not support crossed down in individual map entries, so it can't be indexed without the plan, including the entire Customer objects to deserialize), but I wouldn't address that if it is not necessary, so please indicate if the previous approach fits your needs :). In the case that it is not, you would probably want to the extracted value to be structured on the other hand, the value is the code and 32-bit higher at least 32. You must also write a custom filter that supports the index which is able to use this index going in the direction of Alexey BetweenFilter but with additional controls for the code... In addition, you must check whether the consumption of memory of the filter can be too high...

    Best regards

    Robert

  • Effective way to create an online help for different users

    Hello

    I use RH6 (RoboHelp HTML) on Windows XP to create WebHelp. I need to create an online help for 3 different users, for example, student, teacher and principal. Some functions of the software are available based on the permissions assigned to users. So, I developed a main project file ("All.xpj") that contains all the topics. Then I create a new project for each type of user and import only the topics that relate to the user. It is the most effective way? I didn't have to create 3 or 4 conditional parameters... because I would have to re - create the table of contents, the Index, and the Glossary for each project. It is the most effective way to use RH6 for my needs?

    Any advice or suggestions would be greatly appreciated.

    Thank you
    FMnRH

    Conditional compilation marking would go like this:
    1 mark the topics specific to the user as a 'Student', 'Teacher' or 'Major', as the case may be.
    2 leave unidentified all subjects that are common to all.
    3. Enter the three configurations different single source (SSL):
    -L' SSL must have the term generation student NOT a teacher AND NOT Principal.
    -L' SSL must have the term generation NOT a student teacher AND NOT Principal.
    -The main SSL should have the term generation NOT student AND NON-teaching.
    All unmarked topics will appear in the output.
    4. the table of contents can be trickier; It depends on your structure. Tag user specifi c-books in the table of contents as a student, teacher or Director. Let the unidentified current material. Do the absolute minimum marking here that you can get away with and try to keep the simple tags and high level. It is too easy to lose them in a table of contents complex. The thing to remember here is that if a topic is not in the output, it will be automatically excluded from the table of contents. This means that if you have marked a topic as a teacher, he will not be displayed in the table of contents of the student, even if you do not expressly exclude the table of contents entry.
    5. as a result of the reasoning in number 4 above, the index should take care of itself, and I think that the glossary will be, too, although I have not played with glossaries a lot.

    -----------------------

    I think you have the right idea on how to perform the merge. I don't have access to HR right now to check.

    If all three projects have the same definitions in the glossary, put them in the common project of the child, not duplicate them in the user-specific projects.

    HTH,
    G

  • Is there a need or a way to turn the pencil off the power when you do not use?

    Is there a need or a way to turn the pencil off the power when you do not use?

    Unfortunately not. The best thing is to turn off bluetooth. However, you will need to re - pair the iPad and the pencil again by plugging in the port of lightning. When not used the pencil of apple do not lose a lot of power.

  • The most effective way to the U16-&gt; U32 Array pack for DMA data transfer?

    I have a RT controller who wants to send data to an FPGA using DMA.  In LabVIEW 8.2, I have no choice but to switch to the low blocks of data however U32 my my input data is an array of U16.  This leaves me two choices: 1) wire U16 table directly into the DMA node that will be rude to U32 but I lose 16 bit * #of table 2) Pack the U16 elements in a U32 table before sending it to the bottom.    I have #2 and I have a method that works (and seems to be quite effective) but I have the feeling that I'm doing the hard (or roundabout way).   Is their a simpler (but equally effective) way to do this procedure?  Thank you

    Here's a solution that swaps the bytes and key elements the same. There are several ways to do so.

    (for efficiency, you can place the table 'remodel' inside a case structure then, it happens only if necessary)

  • need the simple way to set the computer back to factory settings, and already saved safe data

    need the simple way to set the computer back to factory settings, and already saved safe data

    Vista recovery media obtain and/or use the Partition Recovery Vista on your computer to the factory settings .

    There is no Vista free download legal available.

    Contact your computer manufacturer and ask them to send a recovery disk/s Vista set.

    Normally, they do this for a cost of $ small.

    In addition, ask them if you have a recovery Partition on your computer/laptop to restore it to factory settings.

    See if a manual provided with the computer or go to the manufacturer's website, email or you can call for information on how to make a recovery.

    Normally, you have to press F10 or F11 at startup to start the recovery process...

    Another way I've seen on some models is press F8 and go to a list of startup options, and launch a recovery of standards of plant with it, by selecting the repair option.

    Also ask them if it is possible to do the recovery disk/s for the recovery Partition in case of a system Crash or hard drive failure.

    They will tell you how to do this.

    Every computer manufacturer has their own way of making recovery disk/s.

    Or borrow a good Microsoft Vista DVD (not Dell, HP, etc).
    A good Vista DVD contains all versions of Vista.
    The product key determines which version of Vista is installed.

    There are 2 disks of Vista: one for 32-bit operating system, and one for 64-bit operating system.

    If install a cleaning is required with a good DVD of Vista (not HP, Dell recovery disks):

    Go to your Bios/Setup, or the Boot Menu at startup and change the Boot order to make the DVD/CD drive 1st in the boot order, then reboot with the disk in the drive.

    At the startup/power on you should see at the bottom of the screen either F2 or DELETE, go to Setup/Bios or F12 for the Boot Menu

    http://support.Microsoft.com/default.aspx/KB/918884

    MS advice on the conduct of clean install.

    http://www.theeldergeekvista.com/vista_clean_installation.htm

    A tutorial on the use of a clean install

    http://www.winsupersite.com/showcase/winvista_install_03.asp

    Super Guide Windows Vista Installation

    After installation > go to the website of the manufacturer of your computer/notebook > drivers and downloads Section > key in your model number > get latest Vista drivers for it > download/install them.

    Save all data, because it will be lost during a clean installation.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    http://support.Microsoft.com/default.aspx/KB/326246

    'How to replace Microsoft software or hardware, order service packs and upgrades, and replace product manuals'

    See you soon.

    Mick Murphy - Microsoft partner

  • The most effective way to retrieve a number of virtual machines in an org?

    Hi all, what is the most effective way to retrieve a MV of County in an org. I am currently recovering all CDV in an org, then all the vApps, then all of the virtual machines and pushing them into a table, then do a vms.length on the table filled by all virtual machines.

    It takes a horrible time, and there MUST be a better way.

    Open to any suggestion. Thank you

    Good, as administrator of the organization then: (I have not tried as a normal user account)

    var vdcs = new Array();
    var orgVMCount = 0;
    var vcdHost = org.getHost();
    
    var queryService = vcdHost.getQueryService();
    var expression = new VclExpression(VclQueryOrgVdcField.ORGNAME, org.name, VclExpressionType.EQUALS);
    var filter = new VclFilter(expression);
    var params = new VclQueryParams();
    params.setFilter(filter);
    
    var resultSet = queryService.queryRecords(VclQueryRecordType.ORGVDC,params);
    while (resultSet != null) {
    
        var records = resultSet.getRecords(new VclQueryResultOrgVdcRecord);
        for each (var record in records) {
            var vdcVMCount = getVdcVMCount(record.href, vcdHost);
            System.log("VDC "+record.name+" VM Count: "+vdcVMCount);
        }
        orgVMCount += vdcVMCount;
        resultSet = resultSet.getNextPage();
    }
    System.log("Total Organization VM Count: "+ orgVMCount);
    
    function getVdcVMCount(vdcHref, host){
        var vmCount = 0;
    
        var qs = host.getQueryService();
        var exp = new VclExpression(VclQueryVMField.VDC, vdcHref, VclExpressionType.EQUALS);
        var exp2 = new VclExpression(VclQueryVMField.ISVAPPTEMPLATE, false, VclExpressionType.EQUALS);
        var exps = new Array(exp,exp2);
    
        var expFilter = new VclFilter(exps,VclFilterType.AND);
        var queryParams = new VclQueryParams();
        var vmArray = new Array();
        queryParams.setFilter(expFilter);
        var rs = qs.queryRecords(VclQueryRecordType.VM,queryParams);
        while (rs != null){
            var vmRecords = rs.getRecords(new VclQueryResultVMRecord);
            vmCount += vmRecords.length;
            rs = rs.getNextPage();
        }
        return vmCount;
    }
    

    It takes a little more code because the ".ORG" field is not available for the non-Admin queryVMField, but the. VDC IS, so we start by retrieving the TDC for the Org, then for each one, ask the number of vm for VDC.

    Post edited by: Burke - had accidentally initialization of orgVMCount as new Array(); -changed second line to 'var orgVMCount = 0;

  • The most effective way to import data from Excel in InDesign?

    Hi all

    I'm designing for a prospectus of college which includes 400 + courses list. For the moment, these lists exist as a huge Excel sheet with fields such as course type, course code, description, etc.

    I am familiar with Excel data import in InDesign and the tables/creation of table styles and other formatting, but the problem I have is that the data are in several columns by courses in the Excel worksheet, but will be in a single column per course with several lines in the InDesign document. I can't find a way to easily convert these columns in lines.

    Someone can help me with an effective way to get the data in the page layout without laborious copying and pasting or formatting?

    Thanks in advance!

    Hello

    In excellent paste / transpose

  • most effective way to retrieve the channel number

    Hello guys,.

    I use this Regexp to extract numbers in a string, and I doubt that there is a more effective way to achieve this:
     SELECT  regexp_replace (regexp_replace ( REGEXp_REPLACE ('  !@#$%^&*()_+= '' + 00 SDFKA 324 000 8702 234 |  " ' , '[[:punct:]]',''), '[[:space:]]',''), '[[:alpha:]]','')  FROM dual
    {code}
    
    Is there a more efficient way to get this done ?
    
    Regards,
    Fateh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

    Hello

    Using regular expressions, you can remove everything that is not a number by saying:

    REGEXP_REPLACE ( str
                , '[^[:digit]]'
                )     
    

    When ^ is the first character inside the brackets, it means "everything except the following.

  • An effective way to check is a line

    Hello

    In PLSQL, what is the most effective way to check it is to a line before I delete the line? I prefer not to use the EXCEPTION to handle the case DATA_NOT_FOUND.

    Thanks in advance!
    Any exception maybe raised when I try to delete a row that does not exists? 
    

    Nope

    drop table my_table;
    
    create table my_table as select level t_id from dual connect by level <= 10;
    
    begin
    delete from my_table where t_id = 100;
    dbms_output.put_line(sql%rowcount||' rows deleted ');
    end;
    
    PL/SQL procedure succesfully completed
    0 rows deleted
    
  • Needing after effect CS5/CS5.5?

    Hello!

    For my composition classes, the teacher requires us to save in CS5 or CS5.5, but lowest my original version of After Effect can save is CS6. I understand based out of others that I need to download AE CS6 record in CS5.5 or, better still, AE CS5 to save in CS5. Can I have access to these versions of the program with the creative cloud? If not, what are my options?

    Thank you!

    No, these versions are pre CC, and no, there is no way to buy at this point neither you right to downgrade if you were to buy CC. Sorry, short of use trial versions for as long as they last, or find a used license there is simply no way.

    Mylenium

Maybe you are looking for

  • Advice and guidance of A350-20s wanted - Windows 7 OS

    1st published: November 2, 2009 23:45' ' In: Forum Home "Satellite series ' Satellite a series I posted this in another section, silly me has not looked through all categories before posting. SORRY! Hi all... I have ordered an A350-20s, (4gig RAM, T6

  • string of slow

    Hello. I want to take a file and remove all lines starting with a '!' and save the file in a single string. After a few hours of work and a lot of Googling around, I've implemented finally something that works, but it's far too slow, it takes about 2

  • Easy Print silver vi quality control

    Hello I just came across an interesting bug? I use the VI easy to print to print the visible part of my front panel. I had a few money controls (now I just will not replace) on the PC, and I realize that printing as a pdf is bad, only for controls of

  • Sort by node table formula

    Hi, everybody, I want to use the formula node to sort a table with order of small to large value, for example 16,2,1,5,3, then the result should be 1,2,3,5,6. then my program is like that, but I can't get the corret answer. Please help me. Thank you

  • Disable Bluetooth on a ThinkPad W500

    How can I easily toggle Bluetooth on a ThinkPad W500? Toggling of WIFI is easy on this device ;-) But nothing found for Bluetooth... Running Windows 7 Professional (64 bit) (Version 6.1 (Build 7600)). I tried the virtual Agent and the FAQ but don't f