question about OAS of forms and trigger procedures os or events

Hello
I have a huge problem here, I have not the slightest idea of how to do that I have a form created from Wizard of the suppliers based on a table, the thing is that I have a special index that I need to specific forms, as well as the bellows of code should do the job, but I know not where to put and how to bind variables.

the variables PERTENECEA and ID_DEPENDENCE would come in the form
Num and txt are auxiliar variable so that I can create the new index
and
id_unidad_admiva is the value I want to insert in each line
declare
 num number;
 txt varchar(10);
begin 
 if substr(PERTENECEA, 0,2)<>0 then
    if substr(PERTENECEA, 3,2)<>0 then
      if substr(PERTENECEA, 5,2)<>0 then
        if substr(PERTENECEA, 7,2)<>0 then
          if substr(PERTENECEA, 9,2)<>0 then
            num:= TO_NUMBER(select MAX(substr(id_unidad_admiva, 9,2)) from unidades_admivas where id_dependencia=id_dependencia and substr(id_unidad_admiva,0,8)=substr(PERTENECEA,0,8);
            num:=num+1;
            txt:= substr(PERTENECEA,0,8);
            id_unidad_admiva:=txt||num;
          else
            num:=TO_NUMBER(select MAX(substr(id_unidad_admiva, 9,2)) from unidades_admivas where id_dependencia=id_dependencia and substr(id_unidad_admiva,0,8)=substr(PERTENECEA,0,8));
            num:=num+1;
            txt:= substr(PERTENECEA,0,8);
            id_unidad_admiva:=txt||num;
          end if;
        else
          num:=TO_NUMBER(select MAX(substr(id_unidad_admiva, 7,2)) from unidades_admivas where id_dependencia=id_dependencia and substr(id_unidad_admiva,0,6)=substr(PERTENECEA,0,6));
          num:=num+1;
          txt:= substr(PERTENECEA,0,6);
          id_unidad_admiva:=txt||num||'00';
        end if; 
      else
        num:=TO_NUMBER(select MAX(substr(id_unidad_admiva, 5,2)) from unidades_admivas where id_dependencia=id_dependencia and substr(id_unidad_admiva,0,4)=substr(PERTENECEA,0,4));
        num:=num+1;
        txt:= substr(PERTENECEA,0,4);
        id_unidad_admiva:=txt||num||'0000';
      end if; 
    else
      num:=TO_NUMBER(select MAX(substr(id_unidad_admiva, 3,2)) from unidades_admivas where id_dependencia=id_dependencia and substr(id_unidad_admiva,0,2)=substr(PERTENECEA,0,2));
      num:=num+1;
      txt:= substr(PERTENECEA,0,2);
      id_unidad_admiva:=txt||num||'000000';
    end if;
  else
    id_unidad_admviva:='0100000000';
  end if;
end;
so I thought it might be a trigger in the database or an event on the form or put this code in a stored procedure, but either way I do not know how

can you guide me please?

Q: ".. by saying that, if PERTENECEA and id_dependencia are mapped to the fields in the table, you mean if they are columns of the table?... »
A: Yes, I guess (maybe I'm wrong) that these two columns are you table definition, and you have used the wizard to generate a form. In this case, you will get a form with, among other areas, the pertenicea and id_dependencia fields ready to be filled. If my hypothesis is correct, then you are in the best of cases because you can use a database trigger.

"Q:" can I use this: NEW.pertenecea and: NEW.id_dependencia in a trigger? »
A: Yes, if the subject is satisfied: PERTENECEA and id_dependencia are mapped to the columns in the table.

Q: "... variable1: =:NEW.pertenecea and variable2: =:NEW.id_dependencia.?
A: Yes, you can write this code and finally the installation program you target column by writing: NEW.id_unidad_admiva: = txt | NB;

Note: If pertenica and id_dependencia are two settings provide you, but are not mapped to a column in the table, while the situation is very different, and you must use a different approach, as described in my previous post, or some other method...

Patrick.

Tags: Fusion Middleware

Similar Questions

  • Questions about syncing wireless keyboard and mouse 5000?

    How can I sync my old 5000 for a new mouse 5000 keyboard and the receiver?

    Hello Eamon,

    Welcome to the Microsoft Community Forum.

    According to the description, I understand that you are facing problem when connecting the new Microsoft mouse USB dongle receiver with the old keyboard Microsoft Wireless 5000.

    I suggest you to contact the Microsoft Hardware support for assistance.

    How to contact Microsoft if you have questions about your hardware device.

    Hope the helps of information. Let us know if you need help with Windows related issues. We will be happy to help you.

    Thank you

  • Question about the composition settings and make

    I looked for an answer to my question, but had to ask at resort, sorry, it's pretty basic, but a direct response is needed I think.

    I imported a project in Premiere pro with two layers of still images with movement and applied effects. I work for a few weeks now, with variations on these pictures and had many number of exports of EI through the render queue.

    After you import the compositions of first CC my starting point; composition and other settings of composition parameters are all resolved HDTV 1080 25 but the set resolution in which I unfortunately now has, is defined as 'Half' (960 * 540)... New compositions also sets the default resolution somehow half...

    My question is about my previous exports and subsequently.  Together of the composition to "Half" resolution affect the quality of my compositions exported using the render module? So far, all my renders are 1080 p by default and no 960 * 540. These have been uprezed to 1080 of 960? ... - I have not changed any setting on the resolution in the rendering module - they all came out 1080 after.

    Thank you

    Together of the composition to "Half" resolution affect the quality of my compositions exported using the render module?

    N ° except if you change the settings of default rendering, which is "Best settings" in "current Configuration".

  • A few questions about integration between POET and EBS

    Hi you
    I am a new bie BIEE. In those days, have a look at the POET architecture and BIEE components. In the next project, there is some work on the development of POET based on request of the EBS. I have a few questions about integration:

    (1) generally, the POET application and database server is decentralized with application and database EBS? Both BIEE 10g and 11g version can be integrated with EBS R12?

    (2) in the POET administration tool, the first step is to create arrays of physics. If the source application is EBS, is it still necessary to create the physical tables?

    (3) if the physical creation of tables is needed, how to transfer data from the source of BSE BIEE physical tables tables? What ETL tool is preferred for most of developers? generator for warehouse or Oracle data integration?

    (4) during the data transfer phase, there are many many large data to transfer, how to keep the entire? for example, it must transfer 1 million lines of source to physical tables BIEE database, when 50% is completed, users try to open the POET report, they can see the new data of 50% on the reports? is there some transaction in phase control ETL?

    could someone give some pointers for me? I am very appreciated if you can also provide any other information.

    Thanks in advance.

    (1) generally, the POET application and database server is decentralized with application and database EBS? Both BIEE 10g and 11g version can be integrated with EBS R12?

    You shud look at OBI request here that uses OBIEE as a tool for reporting with pre-built modules. 10g & 11g comes with different versions of the applications of BI that supports sources such as Siebel CRM, EBS, Peoplesoft, JD Edwards, etc...

    (2) in the POET administration tool, the first step is to create arrays of physics. If the source application is EBS, is it still necessary to create the physical tables?

    His independent of any source. It comes to OBIEE modeling to create the RPD with all the layers. If you build from scratch, then you will need to create all layers else if BI Apps is used so you can get pre-built RPD and other pre-designed components.

    (3) if the physical creation of tables is needed, how to transfer data from the source of BSE BIEE physical tables tables? What ETL tool is preferred for most of developers? generator for warehouse or Oracle data integration?

    BI apps comes with ETL pre-built mapping to use with the tools majorly with Informatica. Only applications BI 7.9.5.2 comes with ODI, but oracle has the intention of having only ODI for any other versions.

    (4) during the data transfer phase, there are many many large data to transfer, how to keep the entire? for example, it must transfer 1 million lines of source to physical tables BIEE database, when 50% is completed, users try to open the POET report, they can see the new data of 50% on the reports? is there some transaction in phase control ETL?

    User will see still old data because its good enable Cache and serving it after each load.

    See http://www.oracle.com/us/solutions/ent-performance-bi/bi-applications-066544.html...
    and a lot more docs on google

    Hope this helps

  • Question about handling apostrophe in the stored procedure parameter

    I was wondering how people have dealt with this problem.  In my process I use the operation to execute stored procedure (sp) to write data to a database, and it is by the way the field values to the sp as parameters.  Works fine when everything is normal but as soon as an apostrophe is added in one of the fields, ka-boom.  It breaks .  So I have been messing around with the means to fight against this problem and did not really come wih an appropriate option.  I know that I can go on the form and write a few RegEx and change the single apostrophe double that would work, but I have to write in several events since the form is sent to someone else and I can't have them seeing "clerk"s"instead of"clerk".  Right now I'm writing an xpath statement that would replace the single apostrophe with a double bed with no luck.  I was wondering if anyone else has had this problem and found an easy solution.  Thank you

    Mike

    Why not use the parameterized query option.

    In this way, your settings are replaced by some? and you don't get messed up with the '

    Your select statement would look like: select * from table where column1 =? and column2 =?

    Then you can map the? s in the process variables.

    Jasmine

  • question about document process plans and the properties of the form object

    The new version of the Workbench has a tool that allows us to print a report that displays the properties of the object used in a model or process shape card? For example... showing all properties such as size, models, fonts, by default, if a field is required or not, etc...? I also check to see if this feature has been added to the Workbench for Process Maps?

    No, it isn't, but there is a blog by John Briinkman entry that will analyze your form template give you some of this information. Here is a link to the blog entry:

    http://blogs.Adobe.com/formfeed/2011/05/updated-form-report-tool.html

    Paul

  • question about the call in the trigger statement

    I faced a question on the written examination.

    A CALL statement in a trigger to call
    package (a)
    procedure b)
    c function)
    (d) another trigger

    Can someone give me answer with reason?
    I used the CALL statement inside the trigger, but not allowing to use. Could be sooner in the oracle CALL statement, we can use... This isn't a guess, so I ask in the forum...
    Please guide me...



    Rgds,
    PC

    You can use the CALL in a trigger without using EXECUTE IMMEDIATE

    SQL> create table t1 (
      2    col1 number
      3  );
    
    Table created.
    
    SQL> create procedure t1_proc
      2  as
      3  begin
      4    dbms_output.put_line( 'In T1_PROC' );
      5  end;
      6  /
    
    Procedure created.
    
    SQL> ed
    Wrote file afiedt.buf
    
      1  create trigger trg_t1
      2    before insert on t1
      3    for each row
      4* call t1_proc
      5  /
    
    Trigger created.
    
    SQL> set serveroutput on;
    SQL> insert into t1 values( 1 );
    In T1_PROC
    
    1 row created.
    

    I see no reason that you would in fact intentionally structure your code this way in this day and age because it would be likely to lead to confusion for those who had to support it in the future. But it's a valid syntax that probably made sense back in Oracle 5.

    Justin

  • Qosmio G20: Question about networking & monitor in and Xbox

    Just bought a G20 last week and I'm in love. First laptop I've ever owned and its worth every penny.

    A few scarecrows.

    I never received an antenna adapter to connect my in arial, but I'm sure I sohuld of fact. In the quick start manual of what it listed everything that I should received in the pack, and who was listed. Was not enough one - if anyone knows a number to contact Toshiba and get one of these sent to me? Can't seem to find one anywhere.

    Second... I'm going to my brother's computer network. Novice course of network, it does not work that well. I'm not sure whether if we need a router? I just want to connect to his computer and use the internet through that. As you would with a network cable. So he bought himself a wireless network card... but we'll be buggered if we can get it too work. Any advice or a definitive guide... or do we this router after all?

    And thirdly, sorry for the long post, but I'm playing my Xbox by the G20, but I'm having no luck what so ever. I plugged the monitor using the three composite cards (white, yellow and red) but nothing that passes through. The only way I've seen a photo is when you set up a decoder and it happens in a small box when its analyses for channels... but I can't select to see and it seems s delay 1 second.

    Sorry for the post long-term... just try to make it all sorted.

    Thanks in advance for any help.

    Hello

    You are right that the Qosmio is a very nice unit.
    But I'm not sure about the antenna adapter. I found the information in the user manual that the antenna adapter is optional. In this case the adapter will not always come with the laptop, but you can ask that the Toshiba service partner.

    Well well, on the network connection: If you want to connect two computer, you need a crossover network cable if you don t use the router. In addition, two laptop computers must be in the same workgroup. In addition, you must manually set the IP address, the default gateway and the subnet mask in the internet protocol TCP/IP properties.

    On the Xbox:
    If you want to know more on the connection of MCE and Xbox, see this Microsoft Web site.
    http://www.Microsoft.com/windowsxp/mediacenter/Extender/mcefaq.mspx

    Check also questions other messages of the forum on the Xbox:
    http://forums.computers.Toshiba-Europe.com/forums/thread.jspa?threadID=9575&MessageID=33794#33794

    http://forums.computers.Toshiba-Europe.com/forums/thread.jspa?threadID=9756&MessageID=34462#34462

    Good luck

  • Question about updating the BIOS and drivers

    Hello

    First time user. How will I know if I need to update bios and drivers? I don't want to go crashing my system, just because Toshiba say these items are available for my laptop! They were probably in the updates of windows?

    Help, please.

    Hi Andy

    Welcome to our small community
    First a little advice you should always write the name of your laptop.

    OK now, to you in general I have a question would not recommend to update anything if you laptop and operating system is stable and you don t have problems.
    Of course the update of the driver is not risky, but I would only run updates some compatibility problems with 3rd party software or hardware appears.

    The update of the BIOS is risky. Wrong or bad BIOS update procedure could damage the ROM module on the map. So be careful.

  • Satellite A60-106: Question about updating the BIOS and the BIOS Flash

    Fact the BIOS Flash update the BIOS or that requires a different file. I've updated a Satellite A60 BIOS to 1.9 but am not sure if cela flashed the BIOS as well.

    If this isn't the case, where I could get a file to Flash BIOS for satellite A60-106?

    Hello

    Sorry, but you question is a bit confusing.
    The update of the BIOS flashing the ROM module I put t know which version is installed before upgrading the BIOS, but if after the upgrade, a new version of the BIOS appears then the procedure was a success.

    The good BIOS and how to upgrade the BIOS information you will find on the page of Toshiba.

  • Questions about serial port read and write at the same time

    Hi I create a user interface for the communication serial port, where there are essentially 2 front panels, where the user enters commands one and the other where the prints of UART is delivered. I thought initially using a state machine but the reading and writing may be independent sometimes and so I can't rely on States. I searched a bit on the forum and he left me even more confused. Help, please.

    (1) in a thread that sessions visa duplicated has been used for writing and reading at the same time, is it recommendable? How will this affect performance?

    (2) essentially when the vi is reading data are it must constantly view as well, however, someone said that it takes too much memory to use shift registers, so how do I go about this? If using a State in queue after the loop of reading it affects the playback loop and be sequential?

    In addition anyway is to move the cursor to the latest data from the indicator

    (3) for the control of the user input, assumes that the user has entered an order in the control and press ENTER, then writing visa is launched, but if it comes in another string and press enter then write must be called again... is - it possible? will detect the previous commands in the control of compensation?

    (4) according to my understand the expectation for the event do not monopolize resources and writing can go in parallel, am I right?

    Thank you. I have attached a very basic vi which took me to the point, but I want to make it more robust. Please help especially in the part of the user interface.

    su_a,

    (1) you can have only one session to a port. Several UART can handle full duplex so performance is not affected.  At flow rates of high data and large amounts of data, buffering and latencies of BONE can become a problem.

    (2) who told you that shift registers using too much memory? Shift registers are usually the best way to transfer data from one iteration to another. String concatenation inside a loop (registry to offset or not) causes the chain to develop and may require re-allocation of memory.  Your VI never clears the string so its cold length become very large.

    Generally, you do not have an active cursor on an indicator.  If you want to always display the most recently received characters and turn on the vertical scroll bar use a property node to keep scrolls to the bottom.  This can be annoying for users if they attempt to manually move the scroll bar and find that the program continues to move it back automatically.

    (3) if the user has changed the value in the chain of command, when he hits enter the modified value event fires.  Simply strike brace does not change the value and does not trigger the event.  Not control need to be erased, but the value that he has to change.  If you want to send the same command again, have a button send a command may be a better choice.

    (4) write is a case of the event.  It is not in parallel with anything.  The structure of the event do not monopolize resources.  The other loop will run while it waits.

    The event loop will not stop when you press the STOP button. Probably it wll take two command: change events of value after JUDGMENT before any loop stops.  Replace the Timeout event (which never expires) with a STOP: value change event and a real wire of this judgment to the Terminal endpoint.  Remove the local variable.  Make mechanical locking when released.

    Lynn

  • question about volume license cd and retail key__

    I am in the process of a computer repair (bad mem and corrupted os). The xp operating system installation cd only I have is for a volume license. As I intend to sell or donate a computer, for obvious reasons, I don't want to put the volume license key in the public domain. The former owner has the disc with a touch of detail record but lost the cd.

    The question is can I use the cd volume and use the retail key?

    NO.

  • Question about product ID records and the screen

    Hi, I play a lot of yahoo pool and we must use the record screen programs to ensure that we do not cheat in most leagues here. One proposed condition is that we show our information in our records system. I ask here to learn more about the potential dangers. I noticed that in one sample screenshot, the ID of the product shows. That's my biggest concern. Can you confirm/deny it would be dangerous to put out this info to anyone?

    Hi SeaDogsFan,

    Never share your number to identify product with a person who is not a legitimate representative of Microsoft.

    Software piracy comes in different forms, some more known than others. Each type of piracy is unique and often requires unique protection methods.

    Counterfeiting is a common form of piracy. Others include loading hard drive, Internet piracy and casual copying or softlifting. Casual copying is the sharing of software between people in a way that infringes on the Software EULA. An example of casual copying is if someone were to get a copy of Microsoft Office XP and load it on his PC, share it with another person who took on his PC, then share it with a third person who charged on his PC and so on. This form of piracy is widespread and represents a large part of the economic losses due to piracy. It is this form of piracy, casual copying, that Microsoft is mainly intended to reduce with Product Activation.

    Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

    Kind regards

    KarthiK TP

  • Question about the memory consumed and active

    I have esx4.1 on three dl585 running. I have about 100 active vm running, and I have a small question.

    My vm is all 2008 r2 datacenter and I gave them 1 cpu and 4 GB of ram. When I recover a single virtual machine and look at the summary page, I see the bones of memory consumed host 4075 mb and the active guest memory 81 MB operating system. My question is can I reduce the host cunsumed memory to 2 GB without noticing a difference within the virtual machine?

    It looks like you can.   To be absolutely sure that you'd need monitor assets long enough to have a good idea of what the average is and what are the tops.

  • Question about removing a HOST and add it again with the other IP management

    Thanks in advance for your help.

    I have an environment with two centers of data/clusters inside my virtual Center 2.5

    One of her consistes of clusters on two ESXi 3.5 licensed nodes. Each of them has 2 VMKernel ports form management. One of them has an IP (A.A.A.1) with any VLAN, the other port is in VLAN111 and IP (B.B.B.1). The other host ESXi has A.A.A.2 and B.B.B.2 IP.

    The other cluster has two 3.5 ESX (not i) and they have a single port/IP managemente (in the VLAN111, which is the same as the other cluster)

    The first cluster appears associated with the virtual center with the No.-VLAN port (IP A.A.A.1 and 2). Is a problem for me because I need to access the first cluster of other machines having no visibility on the A.A.A.x subnet, but it has visibility to the VLAN111. If I connect to the virtual Center, he shows me the IP A.A.A.x but when I try to access them, I can't.

    I would like to do the following WITHOUT affecting the first cluster:

    -Remove each host in my Center Virtual (The VM will continue to work without problem?)

    -Add each host the virtual Center, but this time I'll add the IP VLAN111 (B.B.B.x)

    My question is if these will generate instabilities problems on my dock.

    Thanks in advance

    This process has worked for us when the old VC (2.5) ESX Servers moving again VC (4.0).

    1 undo the HA and DRS configuration on the farm.

    2. unplug all battery ESX servers.

    3 remove all ESX server farm servers.

    4. Add the ESX Server to new cluster in VC (4.0).

    5. configure the HA and DRS on the new farm.

    Used for over 700 ESX servers with zero impact.

Maybe you are looking for