Many sequences/trigger creations in one script?

Hallo,
I want to put some trigger creations in one script, but SQL*Plus doesn't create many triggers, it does create one trigger with compilation errors. When I only use one trigger creation statement alone (and this for all triggers after eachother), all works fine without any errors.
This is my script:
create sequence table1_seq;
create sequence table2_seq;
-- for Table 1
create or replace trigger table1_ins_trig
before insert on TABLE1
for each row
declare
seq_val NUMBER(9);
begin
select table1_seq.nextval into seq_val from dual;
:new.TABLE1ID := seq_val;
end;
-- for Table 2
create or replace trigger table2_ins_trig
before insert on TABLE2
for each row
declare
seq_val NUMBER(9);
begin
select table2_seq.nextval into seq_val from dual;
:new.TABLE12D := seq_val;
end;
All sequences are created and trigger for table1 with errors. When I use the trigger statements separately, all works. How can I use many trigger creations in one script?
Regards
Stephan Schneider

You have to end each pl/sql block with a slash:
create or replace...
begin
end;
create or replace...

Similar Messages

  • How many Sequence-Tags are allowed in one BPEL-File?

    Hello!
    I have read that only one Sequenze-Tag per BPEL-File is allowed. If I need more acticvities I should use scopes inside the Sequenze-Tag. Is this true? Actually I am working on a BPEL-File which contains two more Sequenze-Tags inside the all-embracing Sequenze-Tag. Is this legal?

    if you look into the bpel schema, which can be found here
    http://schemas.xmlsoap.org/ws/2003/03/business-process/
    and look at this here
    - <complexType name="tProcess">
    - <complexContent>
    - <extension base="bpws:tExtensibleElements">
    - <sequence>
    <element name="partnerLinks" type="bpws:tPartnerLinks" minOccurs="0" />
    <element name="partners" type="bpws:tPartners" minOccurs="0" />
    <element name="variables" type="bpws:tVariables" minOccurs="0" />
    <element name="correlationSets" type="bpws:tCorrelationSets" minOccurs="0" />
    <element name="faultHandlers" type="bpws:tFaultHandlers" minOccurs="0" />
    <element name="compensationHandler" type="bpws:tCompensationHandler" minOccurs="0" />
    <element name="eventHandlers" type="bpws:tEventHandlers" minOccurs="0" />
    <group ref="bpws:activity" />
    </sequence>
    it means max one activity .. and in a scope as shown here
    - <complexType name="tScope">
    - <complexContent>
    - <extension base="bpws:tActivity">
    - <sequence>
    <element name="variables" type="bpws:tVariables" minOccurs="0" /> <element name="correlationSets" type="bpws:tCorrelationSets" minOccurs="0" />
    <element name="faultHandlers" type="bpws:tFaultHandlers" minOccurs="0" />
    <element name="compensationHandler" type="bpws:tCompensationHandler" minOccurs="0" />
    <element name="eventHandlers" type="bpws:tEventHandlers" minOccurs="0" />
    <group ref="bpws:activity" />
    </sequence>
    <attribute name="variableAccessSerializable" type="bpws:tBoolean" default="no" />
    </extension>
    </complexContent>
    </complexType>
    the same .. in a sequence shown below
    - <complexType name="tSequence">
    - <complexContent>
    - <extension base="bpws:tActivity">
    - <sequence>
    <group ref="bpws:activity" maxOccurs="unbounded" />
    </sequence>
    </extension>
    </complexContent>
    </complexType>
    0 -> many
    Bottom line, one activity within a process, one activity per scope. n activities within a sequence
    htc clemens

  • How many trigger possible on one table?

    How many trigger possible on one table?

    Hi,
    shiv kumar wrote:
    How many trigger possible on one table?There's no limit.
    If you have more than one trigger that fires at the same time (for example "BEFORE INSERT OR UPDATE ... FOR EACH ROW"), ask yourself why you want or need 2 separate triggers, rather than one (which maybe calls two sparate procedures).

  • Working with many sequences- best practice

    Hi.
    I´ve just started using Adobe Premiere CS6. My goal is to create a 2 hour long movie, based on 30 hours of raw gopro footage recorded on a recent vacation.
    Now my question is, what is the best practice for working with so many sequences/movie clips?
    Do you have one heavy project file, with all the clips?
    Or do you make small chapters that contains x number of sequences/is x minutes long, and in the end combine all these?
    Or how would you do it the best way, so its easiest to work with?
    Thanks alot for your help.
    Kind regards,
    Lars

    I'll answer your second question first, as it's more relevant to the topic.
    You should export in the very highest quality you can based on what you started with.
    The exception to this is if you have some end medium in mind. For example, it would be best to export 30 FPS if you are going to upload it to YouTube.
    On the other hand, if you just want it as a video file on your computer, you should export it as 50 FPS because that retains the smooth, higher framerate.
    Also, if you are making slow-motion scenes with that higher framerate, then export at the lowest framerate (for example, if you slow down a scene to 50% speed, your export should be at 25 FPS).
    About my computer:
    It was for both, but I built it more with gaming in mind as I wasn't as heavily into editing then as I am now.
    Now, I am upgrading components based on the editing performance gains I could get rather than gaming performance gains.

  • One script to make multiple cells call one function or vice versa

    Please help.
    I need one script to make multiple cells reference one function or one cell reference multiple functions.
    Goal: On the enter event of cell c1, I want to make cells (this, Header.c1, Example.c1, rLabel) highlighted, and this would be for every other cell that is entered into, their corresponding column header and row header will be highlighted.
    I've tried combining cells: eg
    colourControls.hdfieldLoseFocus(this, HeaderRow.c1, Example.c1, rLabel);
    and I've also tried combining some scripts in the function:
    fieldObj.ui.oneOfChild.border.fill.color.value = "255,255,200";
      HeaderRow.fieldObj.ui.oneOfChild.border.fill.color.value = "255,255,200";
      ExampleRow.fieldObj.ui.oneOfChild.border.fill.color.value = "255,255,200";
    But they dont work. See the link to my form.
    http://www.winstonanddavid.com/example.com
    I tried testing the function with the cell 'c1' but it doesnt work.
    Also, I want to get rid of the multiple lines of script in every other cell.
    How can I do this?

    I played around with the ExtendScript Toolkit and cutted and pasted the previous script from here until I managed to get a script that actually works like I was thinking. I then added a code from the CS4 Reference Manual to move Layer1 to the top (just to see if it worked).
    I have no idea yet if the the code includes something that does not belong, but at least I get no errors. The current code is like this now:
    //Apply to myDoc the active document
    var layerName = LayerOrderType;
    var myDoc = app.activeDocument;
    //define first character and how many layers do you need
    var layerName
    var numberOfLayers=0;
    //Create the layers
    for(var i=0; i<=numberOfLayers; i++)
    { var layerName = "Background";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = "Picture";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = "Text";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = "Guides";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    // Moves the bottom layer to become the topmost layer
    if (documents.length > 0) {
    countOfLayers = activeDocument.layers.length;
    if (countOfLayers > 1) {
    bottomLayer = activeDocument.layers[countOfLayers-1];
    bottomLayer.zOrder(ZOrderMethod.BRINGTOFRONT);
    else {
    alert("The active document only has only 1 layer")

  • Can I create More Then One seesion in one script?

    Hi all ,
    I have got a requirment to create more then one seesion in one script only
    (means I have to login using multiple USER's in a single script.).
    and also there is no way for LOG-OFF.
    Thanks in advnc.

    Yes. This is a very common task.
    You should databank the User and Password parameters. When running many virtual users in e-load, the script will login each script/user from the list you have included in the databank. When running in Functional playback, each new iteration of a single user will login with a new user from the databank.
    There also does not need to be a logoff. In either Functional or Load playback, each time a script or a virtual user starts a new iteration it will begin as though there are no past cookies or cache files.

  • One script not loading...please help.

    Hi,
    I am a CS 6 Premium - user and have now also used Adobe Story (the free version, considering the Pro - version) for a while - happily.
    - However, today - one script wouldn't open - it just keeps loading and loading and is never opened.  All the other scripts I have opened though, and they seem just fine.
    Nonetheless - This same script will open on my iphone - app (where I also made some notes, this I did not do on any of the other scripts - don't know if there is a correlation..).
    I am on a Macbook Pro and using Adobe Story in the Safari - browser.
    Would be very thankful for some help - a rather desparate situation.

    Thanks for great help from support team found here on this forum.
    File was quickly fixed, de - bugged, and sent to me by Ratnesh - so many thanks! I am breathing in a slightly different manner now.
    Problem was this: The script was unloadable after I had made comments on my Iphone (as far as I can understand - did some tests). These comments were not synced to my browser - project either. I hope this bug will be fixed.
    If any others have been able to do comments with their Iphones without any trouble like this, I should be curious to know how/why it works in other cases.
    - For now I am not making any comment to myself while on the go - other than dictation...:)
    Sincerely,
    Fred

  • How to close RFC connection in one script coding

    In one script, I am using the REF command to call another 2 scripts and these called scripts shd be run on same C36 ( test system). I shd close RFC connection between these 2 scripts.
    That is , once the 1s script over the RFC shd be closed and the user has to give usename and pwd  then  2nd script shd run.
    I have tried with the following code…. But it says RFC is not open……
    REF ( Y04S_FC_RM_CJ88_112 , Y04S_FC_RM_CJ88_1 , C36_999 ).   (when execute this script RFC to C36 will be created and after execution that RFC shd be closed so I included following ABAP code)
    ABAP.
      data : dest type RFCDEST.
      move 'S4_SAPC36999' to dest.                                       
      move dest to v_dest.
    *--Close the connection before opening it incase it is opened
              call function 'RFC_CONNECTION_CLOSE'
                   exporting
                        destination          = dest
                   exceptions
                        destination_not_open = 1
                        others               = 2.
              if sy-subrc <> 0.
              endif.
              move sy-subrc to v_subrc.
    ENDABAP.
    REF ( Y04S_FC_RM_CJ44_112 , Y04S_FC_RM_CJ44_1 , C36_999 ). (here agagin the RFC will be created and this script will be exectued.)

    In one script, I am using the REF command to call another 2 scripts and these called scripts shd be run on same C36 ( test system). I shd close RFC connection between these 2 scripts.
    That is , once the 1s script over the RFC shd be closed and the user has to give usename and pwd  then  2nd script shd run.
    I have tried with the following code…. But it says RFC is not open……
    REF ( Y04S_FC_RM_CJ88_112 , Y04S_FC_RM_CJ88_1 , C36_999 ).   (when execute this script RFC to C36 will be created and after execution that RFC shd be closed so I included following ABAP code)
    ABAP.
      data : dest type RFCDEST.
      move 'S4_SAPC36999' to dest.                                       
      move dest to v_dest.
    *--Close the connection before opening it incase it is opened
              call function 'RFC_CONNECTION_CLOSE'
                   exporting
                        destination          = dest
                   exceptions
                        destination_not_open = 1
                        others               = 2.
              if sy-subrc <> 0.
              endif.
              move sy-subrc to v_subrc.
    ENDABAP.
    REF ( Y04S_FC_RM_CJ44_112 , Y04S_FC_RM_CJ44_1 , C36_999 ). (here agagin the RFC will be created and this script will be exectued.)

  • How many devices can sync to one apple ID?

    How many devices can sync to one apple ID?  I need to get all my music from an old computer to my new computer.  I just purchased an album on my new computer and it's not syncing with my iPhone 5 and I don't want to pay $25 for the Cloud.

    You can sync as many idevices as you like to one computer/library
    The iphone will sync with one and only one computer at a time.  Syncing to another will erase the current content fro the iphone.

  • HT1495 how many devices can be on one itunes account

    How many devices can be on one itunes account ? Is there a maximum

    For syncing iPods and iOS devices, there's no limit.
    For iTunes Store authorization, the limit is 5 computers.
    For iTunes Match, the limit is 10 computers and iOS devices.
    (93256)

  • One script for multiple loaded movie clips

    Hello,
    I am sure that this has been asked or answered before, but
    could not locate the correct response.
    Problem:
    There are 20 movie clips loaded onto the stage through
    actionscript. I have 20 different onPress scripts to start the drag
    for each (which also contain custom variable).
    Problem, I have one single onRelease script which is to be
    used for each, but do now wish to give 20 custom handled scripts.
    Can I somehow use certain scripting for using one single
    generic script for the onRelease? So no matter what was released it
    will go through this one script.
    Thanks
    D

    like this...
    activate
    set the_folder to choose folder with prompt "Select the folder you want to add folders to..."
    tell application "Finder"
    set the_name to "Name"
    set the_count to 3
    repeat with this_num from 1 to the_count
    set new_num to this_num as string
    if (count new_num) is 1 then set new_num to "0" & new_num
    make new folder at the_folder with properties {name:the_name & " " & new_num}
    end repeat
    end tell

  • BCS - Creation of one or more profile pages failed.

    While trying to Configure External Content Type Profile Page in Central Administration, I get this error:
    Creation of one or more profile pages failed.
    1. http://dev-apps:8000/applications/pa.WCFConsumer: Unable to provision profile page because of an error in the BDC Model. Cannot find a Default MethodInstance of Type 'SpecificFinder' on Entity (External Content Type) with Name 'WCFConsumer' in Namespace 'http://dev-apps:8000/applications/pa'.
    What could be the cause of it?

    Did you implement a "SpecificFinder" method in your web service?
    Dimitri Ayrapetov (MCSE: SharePoint)

  • CS5 Image Processor - One script, different image sizes and save locations

    Hello guys!
    is it possible to make one script to convert several images to different image sizes which should be saved in different locations?
    The xml structure is clear, but photoshop accepts only the second "script" if i load a test xml file with two scripts in it.
    Thanks a lot !!!
    Best Regards,
    Tobias

    Hey!
    i solved the problem with an action in which i changed the picture size 4 times (4 times saving for web included)
    its perfect for my needs!
    thanks anyway

  • Sequence contains more than one element error in MVC 5

    I created some models, added the migration and then did an update database operation, though at my last update database operation I got the error message saying:
        Sequence contains more than one element
    Below you can find my migration configuration:
            context.Categories.AddOrUpdate(p => p.CategoryName,
                new Category
                    CategoryName = "Sport"
                new Category
                    CategoryName = "Music"
            context.Subcategories.AddOrUpdate(p => p.SubcategoryName,
                new Subcategory
                    SubcategoryName = "Football"
                new Subcategory
                    SubcategoryName = "Basketball"
                new Subcategory
                    SubcategoryName = "Piano"
                new Subcategory
                    SubcategoryName = "Violin"
            context.Services.AddOrUpdate(p => p.ServiceType,
                new Service
                    ServiceType = "Football player",
                    Category = { CategoryName = "Sport" },
                    Subcategory = { SubcategoryName = "Football" }
                new Service 
                    ServiceType = "Piano lessons",
                    Category = { CategoryName = "Music" },
                    Subcategory = { SubcategoryName = "Piano" }
    The problem occurs with when I add new Services. I already have categories and subcategories, and if I do like Category = new Category { CategoryName = "Music" } then it works but I get Music entry twice in my database (for this example). I want to
    use the already added categories and subcategories. Below also you can find my models definitions.
    public class Category
        [Key]
        public int CategoryID { get; set; }
        public string CategoryName { get; set; }
    // Subcategory is defined the same way...
    public class Service
        public int ServiceID { get; set; }
        public string ServiceType { get; set; }
        public virtual Category Category { get; set; }
        public virtual Subcategory Subcategory { get; set; }
    }

    After reading the article in the link that you have provided, I did the following changes in my models, and created controllers for each of them using Entity Framework, then I created a migration and named it InitialServices. Afterwards, I added a few
    entries in my Configuration.cs file and when I typed Update-Database, I got an error message in package manager saying "RenameIndexOperation", which is marked with red. Below you can find my changed models and my Configuration.cs file, along with the migration
    file created automatically.
    Category.cs:
        public class Category
            [Key]
            public int CategoryID { get; set; }
            public string CategoryName { get; set; }
            public virtual ICollection<Subcategory> Subcategories { get; set; }
    Subcategory.cs:
        public class Subcategory
            [Key]
            public int SubcategoryID { get; set; }
            public string SubcategoryName { get; set; }
            [ForeignKey("Category")]
            public int CategoryID { get; set; }
            public virtual Category Category { get; set; }
            public virtual ICollection<Service> Services { get; set; }
    Service.cs:
        public class Service
            [Key]
            public int ServiceID { get; set; }
            [Required]
            [Display(Name="Service type")]
            public string ServiceType { get; set; }
            [ForeignKey("Subcategory")]
            public int SubcategoryID { get; set; }
            public int Count { get; set; }
            public virtual Subcategory Subcategory { get; set; }
    _InitialServices.cs:
        public partial class InitialServices : DbMigration
            public override void Up()
                DropForeignKey("dbo.Services", "Category_CategoryID", "dbo.Categories");
                DropIndex("dbo.Services", new[] { "Category_CategoryID" });
                RenameColumn(table: "dbo.Services", name: "Subcategory_SubcategoryID", newName: "SubcategoryID");
                RenameIndex(table: "dbo.Services", name: "IX_Subcategory_SubcategoryID", newName: "IX_SubcategoryID");
                AddColumn("dbo.Subcategories", "CategoryID", c => c.Int(nullable: false));
                CreateIndex("dbo.Subcategories", "CategoryID");
                AddForeignKey("dbo.Subcategories", "CategoryID", "dbo.Categories", "CategoryID", cascadeDelete: true);
                DropColumn("dbo.Services", "Category_CategoryID");
            public override void Down()
                AddColumn("dbo.Services", "Category_CategoryID", c => c.Int(nullable: false));
                DropForeignKey("dbo.Subcategories", "CategoryID", "dbo.Categories");
                DropIndex("dbo.Subcategories", new[] { "CategoryID" });
                DropColumn("dbo.Subcategories", "CategoryID");
                RenameIndex(table: "dbo.Services", name: "IX_SubcategoryID", newName: "IX_Subcategory_SubcategoryID");
                RenameColumn(table: "dbo.Services", name: "SubcategoryID", newName: "Subcategory_SubcategoryID");
                CreateIndex("dbo.Services", "Category_CategoryID");
                AddForeignKey("dbo.Services", "Category_CategoryID", "dbo.Categories", "CategoryID", cascadeDelete: true);
    Configuration.cs:
    protected override void Seed(Workfly.Models.ApplicationDbContext context)
                var categories = new List<Category>
                    new Category { CategoryName = "Sport" },
                    new Category { CategoryName = "Music" }
                categories.ForEach(c => context.Categories.AddOrUpdate(p => p.CategoryName, c));
                context.SaveChanges();
                var subcategories = new List<Subcategory>
                    new Subcategory { SubcategoryName = "Football", CategoryID = categories.Single(c => c.CategoryName == "Sport").CategoryID },
                    new Subcategory { SubcategoryName = "Basketball", CategoryID = categories.Single(c => c.CategoryName == "Sport").CategoryID },
                    new Subcategory { SubcategoryName = "Piano", CategoryID = categories.Single(c => c.CategoryName == "Music").CategoryID },
                    new Subcategory { SubcategoryName = "Violin", CategoryID = categories.Single(c => c.CategoryName == "Music").CategoryID }
                foreach (Subcategory s in subcategories)
                    var subcategoriesInDB = context.Subcategories.Where(c => c.Category.CategoryID == s.CategoryID).SingleOrDefault();
                    if (subcategoriesInDB == null)
                        context.Subcategories.Add(s);
                context.SaveChanges();
                var services = new List<Service>
                    new Service { ServiceType = "Football coach", SubcategoryID = subcategories.Single(s => s.SubcategoryName == "Football").SubcategoryID },
                    new Service { ServiceType = "Piano lessons", SubcategoryID = subcategories.Single(s => s.SubcategoryName == "Music").SubcategoryID }
                foreach (Service s in services)
                    var servicesInDB = context.Services.Where(t => t.Subcategory.SubcategoryID == s.SubcategoryID).SingleOrDefault();
                    if (servicesInDB == null)
                        context.Services.Add(s);
                context.SaveChanges();
            }

  • How to Create Multiple Sources/Classes with one Script

    I am trying to get all of my java sources, or classes, into one script so that I can move them all to another server without having to compile each file individually. When I concatenate two files and try to compile I get an ORA-29536: badly formed source error.
    How can I get multiple definitions into one file and compile all of the classes?
    Thanks,
    Gregory

    Gregory:
    If you want to upload several Java classes in one script the solution is .sql file, for example:
    set define ?
    create or replace and compile java source named "my.Sleep" as
    package my;
    import java.lang.Thread;
    public class Sleep {
    public static void main(String []args) throws java.lang.InterruptedException {
    if (args != null && args.length>0) {
    int s = Integer.parseInt(args[0]);
    Thread.sleep(s*1000);
    } else
    Thread.sleep(1000);
    create or replace and compile java source named "my.App" as
    package my;
    public class App {
    public static void main(String []args) throws java.lang.InterruptedException {
    System.out.println(args[0]);
    exit
    Then the .sql file can be parsed using the SQLPlus, JDeveloper or SQLDeveloper tools.
    HTH, Marcelo.

Maybe you are looking for