FUNCTION/TRIGGER AND COMMIT

Hello friends,



When I tell about why we can't use DOF / (dml with commit), inside a function then the following came to my mind.

(1) given that often functions are like a black box for the applicant, so if we use a function call in the middle of its transaction, then the DDl / (DML with commit) can be be very bad since the functions can be called from within sql statements, which can make a part of the transaction without knowing of the Summoner. so the alternative is doing an autonomous transaction and I fully agree to this.


(2) but why is it not valid check for a procedure. What I mean is that a procedure can be called from some other plsql block. So why slope above points is valid for both procedures. I know it's not like that, but why?


Thanks in advance and I really appreciate everyone for their response :)

Rahul K wrote:
1 select statements) are only for the selection, I agree, but select can often be part of a transaction (if used in a sub query).

??

and if I'm wrong, then why we can't use a validation/ddl inside a function? Oracle must have thought something before this rule.

As I have already said, you can use COMMIT inside a function...

And why no DDL?

Read this great Billy

>
The fundamental reason is that PL/SQL code is compiled and static.

The language allows to give instructions to Oracle. It is converted to machine or instructions of the p-code (binary) code.

As part of this process of compilation of references. Oracle does not refer to internal to an object by name. That will be too slow. He refers to it by its unique number. So, if you are referring to the FOO object, the compiler will solve FOO and determine who/where/what FOO is.

Let's say that you code the following PL/SQL:

Start

CREATE TABLE emp (empid NUMBER, name of VARCHAR2 (20));

INSERT INTO emp (id, name) VALUES (1, 'Smith');

end;

Hmm... How the compiler can process this? He needs to create a reference to the EMP object for the CREATE TABLE statement, but there is no EMP.

All right, let's assume that the compiler needs to play dirty and do in CREATE TABLE. Now, he runs into a problem. I made a mistake with the names of columns in the INSERT. There is no such thing as the EMP table. So how did the compiler assumes to create the p-code/machine code for this?

The only way that it can treat that is dynamically. Which is exactly what is the EXECUTE IMMEDIATE statement.
>

In addition, read it atAsktom

Tags: Database

Similar Questions

  • My only intention is to create a model/site based URM where we can provide functionality to scan for users. We want a distributed feature where users can scan the images remotely and commit to the WCC:Records / URM. Is it possible to be thr

    My only intention is to create a model/site based URM where we can provide functionality to scan for users. We want a distributed feature where users can scan the images remotely and commit to the WCC:Records / URM.

    Is it possible to be done through Oracle distributed Document capture (ODDC) and if it is possible how to connect ODDC with the client browser. Please suggest

    Ok. So, the answer is certainly: Yes, it is possible.

    The part of analysis, this is exactly what ODDC is good for. Unless you have the license already, however, you may have to go with the product to Capture Oracle WebCenter (large companies), which provides the necessary also.

    Regarding the validation and storage, ODDC/ODC/WebCenter Capture can commit images scanned at several depots, including University Complutense of MADRID (URM can be considered a Complutense University of MADRID with a specific purpose / several modules or components under voltage and configured). So, technically, he has no problem.

    When I have little doubt, however, is the meaning of the scenario - declaring an item as a record is an important event in the life cycle of the document - a record is often (or always) cannot be changed to ensure the integrity and non-repudiation of information. In this perspective, a direct validation of a recording of a scanning system (where errors such as bad scans, lack of pages, etc can be expected, particularly if the scanning is performed by the end user in a distributed fashion - so, not very experienced) seems a little dangerous.

  • Not able to see the semi colon and comma when sending email

    Hello

    I am not able to see the semi colon and comma everything by typing the e-mail address to "TO" However in the body of the email, I'm able to see.

    Thank you

    Rakesh K *.

    ***********

    The comma and semicolon are on the digital keyboard.

    Click on the '123' button at the bottom left, and then you will see them.

    UPDATE: the above is true then in the text box.  Sorry I misread your question and thought that was what you were asking about.  The semi-colon and comma are without function in the recipient area.

  • I need to use programming like ActionScript loop, trigger, and load the data in the movies.  I can do with AE?

    I have been producing auto generate and parameter based animations for an artist over the years using Flash.

    Like this: Zarah Hussain | Animation

    Someone asks now that we use After Effects, but I need to use programming like ActionScript loop, trigger and load data into the movies.

    I can do with AE?  We need the loading animation 3 data values that affect the colors in real time

    Is it: -.

    Flash = online and interactive

    AR = fixed and linear.

    Help!

    Cries.

    You cannot use AE for this kind of things. Outside very limited real-time EI functionality it has not yet officially a dynamic performance of preload beyond the evalFile() hack. None of this makes no sense at all.

    Mylenium

  • sum of sal and comm in the emp table

    Hi all

    for the table emp with enam, eno, dept, sal and comm fields

    I want to display a field in oracle forms 6i, who will show me the sum of sal and comm

    I've created a field of no database
    and wrote this code in the formula
    declare
    summ number(10);
    begin
    
    summ=:sal + :comm
    end;
    but I get the compilation failed

    kindly Guide

    thanking in advance

    Hello

    your code

    declare
    summ number(10);
    begin
    
    summ =:sal + :comm  --this line must be  summ :=  nvl(:sal,0) + nvl(:comm ,0)
    end;
    

    Try this code to a trigger
    change after exp.

    declare
    summ number(10);
    begin
    
    summ := nvl(:sal,0) + nvl(:comm,0)
    end;
    

    or send me your complete code.
    Thank you

  • How to escape the quotes and commas when you use the command of the coil

    I am creating a file .cvs with data in my database. I call the function of coil and below select stmt

    ' Select ' ' ' | ID | '","' || name | '","' || Description | '","'

    I want everything to be separated by quotes and commas. Description data can have quotes and commas so how I get away from them in my queue code so that when I use SQL Loader data will get entries in the database correctly.

    Thank you!

    Hello

    If the field is closed, so there is nothing else you need to do for the column separator (en).

    To use the character encompassing ("") in the field, double it, the same way you use two single quotation marks to signify a single_quote into a SQL string literal:
    {code}
    ' SELECT ' ' ' | ID
    ||     '","'     || name
    ||     '","'     || REPLACE (description
    , '"'
    , '""'
    )
    ||     '"'
    FROM table_x;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
    
  • Satellite A660 - 1 H 7 function keys and Logo lights went out

    It may seem a little ridiculous to the experience of users of Toshiba laptops, BUT I have my laptop recently and there are a few days, I've lost the lights on my (next to the power switch) function buttons and the 'objective' logo in the lower left corner.

    I don't know if I've done something to turn them off?
    Unfortunately I don't know how to get the lights back on.

    Can someone please help and tell me how (step by step if poss) to get back them.

    Thank you in advance.

    > I don't know if I've done something to turn them off?
    > Unfortunately I don't know how to get the lights back on.

    As far as I know this feature is controlled by Backlight.exe and you can find it in
    Program Files\Toshiba\TBS\Backlight.exe

    It is usually part of the VAP (value added package) to reinstall this package should help you get it working again.

    You can also assign this file exe button again with the Support of TOSHIBA Button tool

    Someone wrote in the forum:
    + When I go into "TOSHIBA button Support", I only have empty fields with the choice in the background to set "TOSHIBA Assist" or "Presentation". Empty fields are 'Description', 'Option' and 'path of the target. There is a button 'Browse' to select a program manually, but I have no idea where the exe "backlight on / off" is, when one exists. +

  • After you download the security update 2015-008 I lost the function of the function keys and some other functions. Have already played with the keyboard f nothing helps. Are also past system on and outside...

    After you download the security update 2015-008 I lost the function of the function keys and some other functions. Have already played with the keyboard f nothing helps. Are also past system on and outside... need help pls

    PS noticed the update downloaded twice

    disregard my previous question... I found the answer: F1, F2 has been ticked on.

  • My function keys and volume controls will no longer work. Help.

    I'm unable to use my function keys and my volume level is not displayed on the screen as before.  I think that maybe the software controlling the function keys and volume control screen is damaged or not loading.  HELP please.

    Hello

    Download and install HP Quick Launch Buttons on the link below.

    FTP://ftp.HP.com/pub/SoftPaq/sp49001-49500/sp49104.exe

    Once the installation is complete, restart the laptop.

    OSD volume is provided by HP MediaSmart SmartMenu, so if you still don't see display, try the method in the link below and use Recovery Manager to reinstall this app - NOTE: you need at least one other application MediaSmart must be already installed, IE HP MediaSmart DVD, before you reinstall the Menu Smart.

    http://support.HP.com/us-en/document/c01868333

    Kind regards

    DP - K

    

  • How to trigger and outputs analog and digital Outout tasks begins on a counter to start?

    Hello

    I'm trying to synchronize the start of a task outputs analog, a task of digital output and a task of counter. I want to start the counter to serve the master trigger and analog and digital tasks to synchronize his departure.

    I guess I need something like:

    analogOutputTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger ("?", DigitalEdgeStartTriggerEdge.Rising);

    digitalOutputTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger ("?", DigitalEdgeStartTriggerEdge.Rising);

    analogOutputTask.Start (); Slave 1

    digitalOutputTask.Start (); slave 2

    () counterTask.Start; n / / master

    Where? is a string specifying a command source for the beginning of the task of the meter. However, I can't find what this string. Any suggestions?

    Thank you!

    -Jon

    Just FYI, the solution to this problem as well as some other ones is encapsulated in a short example .NET, I created. It is on the Web site of EITHER:

    http://decibel.NI.com/content/docs/doc-15500

    This project shows how to synchronize all your analogue/digital outputs through tasks and forums in terms of synchronizing Calendar and start clock.

    -Jon

  • Cannot find the prototype of the function DeleteLinesFromFile and InsertlinesInFile

    Hello

    I want to remove or insert a line in a file. I want to use the function 'InsertlinesInFile' and 'DeleteLinesFromFile '. but I did not find the library to declare the prototype.

    Anyone know the library include what I need to use this function or other solutions to my problems.

    Thank you for your response.

    Stéphane SQUARE

    Hello Stéphane!

    Functions are from Server ActiveX LabWindows/CVI Interface: http://zone.ni.com/reference/en-XX/help/370051Y-01/cvi/usermanual/actxappdeletelinesfromfile/

    You can see the \activex\cvi\cvidemo.prj sample project to see how it is used.

    -Johannes

  • I can't turn on my wireless (wifi) on my laptop, even when I tried to press the function key and F8

    I can't turn on my wireless (wifi) on my laptop, even when I tried to press the function key and F8. I have a toshiba laptop, and there is no switch on the side of my computer what is expected? Help someone?

    Hello

    My older Toshiba has a power switch WiFi.

    My new Toshiba has a WiFi switch above the F keys, although I do not know which varies
    by model. So check with Toshiba support, their documentation online and drivers, and
    ask in their forums where there will be others with the same model.

    Toshiba - Forums
    http://laptopforums.Toshiba.com/

    Toshiba - Contacts
    http://www.CSD.Toshiba.com/cgi-bin/TAIS/support/JSP/navShell.jsp?CF=su_contact

    Toshiba - drivers - access your model
    http://www.CSD.Toshiba.com/cgi-bin/TAIS/support/JSP/home.jsp?NAV=download

    Toshiba - Support
    http://www.CSD.Toshiba.com/cgi-bin/TAIS/support/JSP/home.jsp

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • Is it possible to hide a conditional function in responsibility. Say it together a small number of users, I need the function display and for some users, it must be hidden.

    Is it possible to hide a conditional function in responsibility. Say it together a small number of users, I need the function display and for some users, it must be hidden.

    Hello

    The normal thing to do is to create a similar additional responsibility and using Exclusions to 'hide' the features you want.

    Then assign it to restricted users.

    Kind regards

    Bashar

  • How to set a blank publication to hide the target (menu) during the click on trigger and target

    I created a menu using the widget consisting of vacuum.  I want the menu to close only when the user clicked the menu button or clicking on the target (bottom of page).

    Could someone please explain a method to do that the Muse offers options are limited to; Hide targets: on click. decelerate; the deployment of the trigger and the target.

    Thank you

    Luke

    You can do one of these «Hide target click» options
    (when you click the shutter button, that will close the target)

    There is no other way in Muse to close a target outside options for this widget.

    You could research third-party widget, there could be an option there.

  • I, how to place text on top a trigger and still have the trigger work normally?

    Hello

    I'm trying to place a box over a trigger, as I want the text to change (on rotation) while my zone target show. Only problem is that when I place the text on top, the trigger stops working.

    Is it possible to have my cake and eat it?

    See you soon,.

    Stephen

    The text block must be placed in the container of trigger (not behind it). All elements in the container to trigger will cause a transition between States when the mouse is over the area of the trigger container or the container is associated with the current item in the collection. If you are mixing elements hyperlink and containers of trigger, you must put the hyperlink on the container to trigger, and not on the items in the container of the trigger.

Maybe you are looking for

  • My Satellite L20 system cannot start.

    Hi guyz,I just signed up now all hoping someone can help me with problem am with my laptop toshiba L20... who was be a very recent laptop that was made in October 2005.A friend bought the laptop in Germany and down to me sent to Nigeria, I only used

  • the voicemail icon

    Does anyone know how to get the voicemail icon go? I deleted voice messages, but the icon remains in my notification bar.

  • Windows xp professional will accept the new upgarde. ?

    my windows xp professional accepts the newly available internet upgrade

  • equipment expensive Zolid diascanner

    computer kan geen stuurprogramma vinden voor Zolid dia scannner. IK werk met windows 7

  • Shut down the system disabled

    Hello I created a shutdown task system these instructions http://answers.microsoft.com/en-us/windows/forum/windows_7-performance/how-to-schedule-computer-to-shut-down-at-a-certain/800ed207-f630-480d-8c92-dff2313c193b  How can I disable it?