Can dynamically create you index rules or virtual models in plsql?

I am writing a plsql utility that loads data into a new model in offline mode. Once the load is complete, I need to create a new index of rules based on the definition of an index of existing rules. Once this is done, I need then to drop my virtual model existing and re-create it to include the new model I just loaded. I realize I could hardcode the two statements created in my plsql but I rather dynamically build lists of types "sem_apis.create_entailment" and "sem_apis.create_virtual_model" so that I don't have to change the code every time that I add new models to my environment (i.e. with this feature, I can add new models to the index of the rule and vitual manually models and my load utility would automatically include) in the next run of load).

How can I pass the list of templates in each of these APIs? The documentation states that both accept a parameter of "models_in" of type SEM_MODELS, to whom he explains has a definition of TABLE OF VARCHAR2 (25).

I created variables of types said in my utility and initialized them valid with models. However, whenever I try to run the API in my plsql using these variables, I get the following error:

PLS-00306: wrong number or types of arguments in the call to 'CREATE_VIRTUAL_MODEL '.

I have attached the sample code below:

declare
Model_T. ARRAY TYPE IS VARCHAR2 (25);
model_list model_T;
Start
model_list: = model_T ('M1', 'M2');
for me in model_list.first... loop of model_list. Last
dbms_output.put_line (i: ' = ': model_list (i));
end loop;
sem_apis.create_virtual_model ('m12_NEW', model_list);
end;
/


Has anyone successfully done this before? Any ideas how I might be able to get this to work?

Thank you!

Use the type SEM_MODELS as shown below:

declare
model_list SEM_MODELS;
Start
model_list: = SEM_MODELS ('M1', 'M2');
...
end;
/

Tags: Database

Similar Questions

  • can we create an index only for a given value in a column?

    desc TAB_A
    -----------------
    id1  Number Primary key,
    id2  Number,
    col1 varchar2(10),
    col2 varchar2(10)
    
    
    
    select count(*) from TAB_A
    --------------------
    4587609
    
    select count(*) from TAB_A where id2=10 
    ------------------
    6000
    
    Here is my question
    
    
    can i create an index only for the cloumn id2 only for the value 10?
    Thank you
    Mike

    Hi, Mike,.

    You can have a function-based index.

    CREATE INDEX tab_a_id2_10 ON tab_a
    (   CASE
            WHEN  id2 IN (10)
            THEN  id2
        END
    );
    

    In Oracle 11.2, it might be cleaner to have a virtual column (indexed).

  • Can I create an index on a partitioned table bitmap?

    Can I create an index on a partitioned table bitmap?

    Yes, you can. But an index on a partitioned table bitmap must be a local index.
    Image bitmap index on non partitioned tables cannot be partitioned.

  • How can I create more space in my virtual memory

    How can I create more space in my virtual memory

    In fact this post with this link is pretty bad.

    Virtual memory used by xp as ram memory, however the memory or

    swap file is on the hard drive. For a pc of refrence memory from a hard drive is very slow

    compared to the RAM. Most of the technicians want to eliminate virtual memory as well

    as possible, making the use of ram pc instead. For a better link, go to.

    http://TechNet.Microsoft.com/en-us/library/cc751291.asp

  • QUESTION: Can't create a firewall rule to (edge) with the REST API

    Dear Sir

    I am trying to create a firewall rule for simple and basic edge using the REST API.

    I use the REST API guide as a reference on page 158.


    edge-fw-rule.png

    I use the following code (single) in my client REST API (with good content Type (application/xml)):

    < rule >

    < ruleTag > < / ruleTag >

    < name > edge5-rest-rule < / name >

    all < source > < / source >

    < destination > all < / destination >

    < application > all < / application >

    < matchTranslated > true < / matchTranslated >

    < management > in < / direction >

    < action > deny < / action >

    < enabled > false < / enabled >

    < loggingEnabled > true < / loggingEnabled >

    rest-api-rule of the < description > < / description >

    < / rule >

    The error message that I receive is the following:

    <? XML version = "1.0" encoding = "UTF-8"? >

    < error >

    request details invalid <>. Found no match for item rule. < / details >

    < > 223 errorCode < / errorCode >

    < / error >

    The full screenshot of my action REST API is in the screenshot below:

    full-request.png

    Anyone know what I'm doing wrong here?

    Thank you!

    Try this as the body...

    rest-rule

    user

    true

    in

    deny

    fake

    true

    rest-api-rule

  • can I create an index on the column of duplicate lines?

    Hello

    I tried to create a unique index on an existing table, containing the duplicate lines.

    I want to create an index of type everything on this column of duplicate rows.

    If possible pls suggest me.


    Kind regards
    Vincent.

    Yes.

  • Create the folder under computer virtual &amp; model

    Using powershell, I want to create a folder in Machines virtual & view sandrine models a data center which has the same name as existing in cluster.  I can get the command new folder works but it is default to create the folder in the view of data centers.

    Tthanks!

    If I understand your question, you want to create a new folder called 'blue'.

    The trick is to know that there are some hidden (from the point of view customer VI) folders that you need to know to make it work.

    In the case of the view 'Machines virtual & templates' folders called 'vm' in each data center there.

    This script shows you how to create a folder 'blue '.

    
    $dcName = 
    $dc = Get-Datacenter -Name $dcName
    $parent = Get-Folder "vm" -Location $dc
    New-Folder -Location $parent -Name 
    

    PS: with the managed object browser, you can see the full hierarchy including these "hidden" folders

    Point a browser at https:///mob

  • How can I create a NoInput rule effectively

    Hello

    My rule script skills are a bit rusty. I have a few accounts that I want to put has no entry, but I don't want to have 1 line per account:

    Noinput ' a L1234 #

    If I put in the account NoInput property in the area of the Usedefined2, could I write a basis of rules no. Input on the scope of Userdefined2?

    Noinput subroutine:

    NoInput "If HS. ACCOUNT. Node2 = NoInput

    End if

    Or should I use the list of accounts?

    You can create a personalized account list that contains all accounts with node2 = "NoInput" like this:

    Void EnumMemberLists()

    "# is a space reserved for when you go to copy the text in your list file, replace you it with the new number of total lists for this dimension
    Dim aAccountLists (1)

    Select HS case. Dimension
    Case 'account '.
    "# is a placeholder for the number correct to list specific when copy you the syntax into your list file aAccountLists (#).
    aAccountLists (1) = "AccountsUD2NoInput".
    GSA SetMemberLists aAccountLists
    Select end

    End Sub

    Void EnumMembersInList()

    Select HS case. Dimension
    Case 'account '.
    Select HS case. MemberListID
    "# is a placeholder for the exact number of the list when you copy this syntax in your file list.
    Case 1
    aLi HS =. Account.List ("", "[Basic]")
    For i = LBound (aLi) to UBound (aLi)
    If HS. Account.UD2 (aLi (i)) = "NoInput" Then
    GSA AddMemberToList aLi (i)
    End If
    Next
    Select end
    Select end
    End Sub

    The above code must appear in a file with the extension .lst and responsible members in HFM using the lists of members of load.

    Then your NoInput routine in your normal rules file would look like this:

    Void NoInput()

    aLi HS =. Account.List ("", "AccountsUD2NoInput")
    For i = LBound (aLi) to UBound (aLi)
    GSA NoInput "A #" & aLi (i)
    Next

    End Sub

    This way you do not check the UD2 during execution of the NoInput rule.

  • How can I create a template based on another model

    I have a template that I used for my article pages, but there are several changes that I do when an article page is created according to the model. I would like to create a new tamplate specifically for the pages of my article, but still have the pages of the article was updated to the evolution of the original model which has all the features that are common to all pages.

    Do not even think to go.  Nested models drive you crazy and only create problems for you, not to solve them.  I've never found an application for nested models that could not be resolved more simply and with fewer complications in other ways.

    Please show me your page and tell me what changes you want to make to the layout - and why you feel you need to use nested templates.

  • How to create an index for a PK

    Hello

    Trying to name and create features for an index for a primary key must be created. I can't find this information in the documentation. Can someone explain how to do this?

    Thank you
    Bob Larsen

    Hi Bob,

    In the Data Modeler, you can first create an Index by opening the Table Properties dialog box in the relational model and select "Index" in the left panel.
    You can then use the button '+' to create a new Index and set its name and its columns (or his expression if you select the Expression of Index box).

    You can then ask to use this Index for the primary key as follows:-
    Navigate in the tree view of the browser to the node Table in the relevant physical model. If you expand that, it must contain an entry for the primary key.
    Open the properties of the primary key for this entry dialog box. On the general tab, set its property "with the help of the index" BY INDEX name, click its tab "with the help of the index' and set its property to"Existing Index"to refer to the relevant index.

    Moreover, in the primary key of physical model properties dialog box, you can set the property 'with the help of the index' to BY CREATE INDEX STATEMENT, and then on the 'Index to help' tab, you can enter the Index definition in the field 'Create Index Statement.

    David

  • Create an Index file?

    Hello:

    With the help of Dreamweaver 7 (even if 8 is on the way) that I provided content and some low level to a website design. (Style sheets?) models are CFM, which I am slowly coming to speed on. I want to download and link a large number of documents that will be offered to viewers of the site. Over time, I will summarize each document and provide a direct link. Initially, however, I would like to just display the illustrated and connected directory with the files: "/Publications Index" (for example: http://www.srh.noaa.gov/ridge/RadarImg/)

    Site security do not allow direct viewing of the folder. Can I create an index file which has a script that automatically displays all files related to open it? (/ Publications/index.cfm)- or is it possible to do this easily?

    Thank you

    George

    Yes. Just what I was looking for.

    Thank you very much

    George

  • Can I create a static IP address for my virtual server when my physical network only has a dynamic IP address?

    Hi all!

    About, what I'm trying to do is to create an entire virtual network. I'm working on and studying for my MCSE and wanted to create a virtual server and a few virtual desktops.

    I wanted to put up a few roles on the server which (sort of) requires me to have a static IP address. My question is can I create something like a "static IP address make fun" to do?

    I prefer not to pay the additional sum of $ my ISP for a static IP address if I have to. Other than this virtualization project, I don't need a static IP address.

    Thank you!

    Create and internal network, then NAT so they can talk to the internet.

  • You can create an index on a map?

    I have a few questions that I can't understand, or find a viable for example. You can create an index for a card, contained in a nested object, and if so, how would you do that? I have currently a filter inspected this criterion in the cache, but I am unable to understand to create an index of usabe for the custom filter. I use coherence 3.5.2 - any help would be most appreciated. I don't know if / what should I do with the SimpleMapIndex...

    Here's the Basic object below map. My filter retrieves all objects of ClientType with a client in his collection that contains the past in integer value in the customer's card. So can you create an Index on a card (and a nested to it) and how do you this? The index should be on the nested customerValues hashmap.
    class CustomerGroup
    {
        Set<Customer> customers ;
    }
    
    class Customer
    {
        Map<Integer, CustumerValue> customerValues;
    }

    If you write a custom, ValueExtractor you need to create an index, then you will not have a custom filter.

    Depending on how effective it must be custom Extractor you can use POF and don't have to deserialize the entries to create the index, or it can deserialize the class, which will make the code simpler.

    For example, without the use of POF

    public class MapKeyExtractor extends EntryExtractor implements PortableObject {
    
        public MapKeyExtractor() {
        }
    
        @Override
        public Object extractFromEntry(Map.Entry entry) {
            Set keys = new HashSet();
            CustomerGroup group = (CustomerGroup) entry.getValue();
            Set customers = group.getCustomers();
            for (Customer customer : customers) {
                keys.addAll(customer.getCustomerValues().keySet());
            }
            return keys;
        }
    
        @Override
        public boolean equals(Object obj) {
            return (obj instanceof MapKeyExtractor);
        }
    
        @Override
        public int hashCode() {
            return MapKeyExtractor.class.hashCode();
        }
    
        @Override
        public void readExternal(PofReader in) throws IOException {
            super.readExternal(in);
        }
    
        @Override
        public void writeExternal(PofWriter out) throws IOException {
            super.writeExternal(out);
        }
    }
    

    The extractor above returns a collection of all the integer values in the keys to all the customerValues of all customers in a ClientType (I guessed you have some accessor methods on classes that you posted).

    You can then use a ContainsFilter for your query. For example to get all values in the cache where the customerValues card contains a 19-key...

    Set results = cache.entrySet(new ContainsFilter(new MapKeyExtractor(), 19));
    

    You could write a version of the MapKeyExtractor which uses POF and wouldn't not deserialize values, but it's more complicated code, because should extract the POF of value stream map and go down the keys and values extract the key. It's doable, but not worth it unless you're really worried about the execution of updates of the index.

    Discalimer I wrote the code over the top of my head so have not compiled or tested, but it should be OK.

    JK

  • Can I create multiple dynamic entries during execution?

    Can I create multiple dynamic entries during execution?

    Oracle 11g
    Request Express 4.0.2.00.06

    Here's my problem:
    We have a table that contains metadata about the files (paper or electronic).
    We hope that we can need more columns in the table at some point and do not want to change the table or the application.

    So to do this I would like to create:

    A table called TBL_FILE with columns:
    NUMBER of TBL_FILE_ID (this will be the primary key)
    TBL_FILE_NAME VARCHAR2 (1000) (this will be the name of the file)

    A second table will be called TBL_FILE_META with columns:
    NUMBER of TBL_META_ID (this will be the primary key)
    NUMBER of TBL_FILE_ID (this will be the key to forign to the files table)
    TBL_META_COLUMN VARCHAR2 (30) (this is what would be the name of the column if it existed in TBL_FILE)
    TBL_META_VALUE VARCHAR2 (1000) (this is the value of this record and the column "would be")

    If a person can have as many meta data in the file to add columns to the table.
    The problem is how can I allow users to add as much data as they wish with them having to re develop page.

    Other things to note is that we would like this be on one page.
    I know how to add we can create inserts several rows using a SQL (editable report).
    However the TBL_META_VALUE in the TBL_FILE_META column will sometimes be a selection list and other times one text box or a numeric field.
    So I don't see now a SQL (editable report) would work for this and I can't create a table of elements on the page running I can?

    No idea how I might accomplish this? Is there a better way to do this?

    It is a term or a name for what I'm doing by creating these "virtual" columns in another table?
    I found this method looking at the workflow tables Oracles.

    Welcome to the Oracle Forums!
    >
    Can I create multiple dynamic entries during execution?

    Oracle 11g
    Request Express 4.0.2.00.06

    Here's my problem:
    We have a table that contains metadata about the files (paper or electronic).
    We hope that we can need more columns in the table at some point and do not want to change the table or the application.

    So to do this I would like to create:

    A table called TBL_FILE with columns:
    NUMBER of TBL_FILE_ID (this will be the primary key)
    TBL_FILE_NAME VARCHAR2 (1000) (this will be the name of the file)

    A second table will be called TBL_FILE_META with columns:
    NUMBER of TBL_META_ID (this will be the primary key)
    NUMBER of TBL_FILE_ID (this will be the key to forign to the files table)
    TBL_META_COLUMN VARCHAR2 (30) (this is what would be the name of the column if it existed in TBL_FILE)
    TBL_META_VALUE VARCHAR2 (1000) (this is the value of this record and the column "would be")

    If a person can have as many meta data in the file to add columns to the table.
    The problem is how can I allow users to add as much data as they wish with them having to re develop page.
    >
    Creation of dynamic Page elements is not available. You must create surplus items and hide/show, etc. But you cannot change the element Type. Overall, too many restrictions in this approach.
    >
    Other things to note is that we would like this be on one page.
    >
    The limit of 100 points will hit you if you go with extra page element. With the form of tables that should not be a limitation, unless you're exceeding the limit of 50 APEX_APPLICATION point. G_Fnn points and limitation of the 60 column of the region report with "(analyze the query executing only) use generic name column" in the dynamic region.
    >
    I know how to add we can create inserts several rows using a SQL (editable report).
    However the TBL_META_VALUE in the TBL_FILE_META column will sometimes be a selection list and other times one text box or a numeric field.
    >
    If the type if the item is variable, that doesn't mean that you have to type a way to store the item. Metadata of meta data.
    >
    So I don't see now a SQL (editable report) would work for this and I can't create a table of elements on the page running I can?
    >
    Yes, you can do it. Update report / query in a table can be built from the metadata using the SQL query that returns the PL/SQL function . It will be a bit of coding in PL/SQL where you use metadata and metadata of Meta data to restore your SELECTION with the right APEX_ITEMs. He might have a decrease in performance associated with it, but it will not be a serious degradation.
    >
    No idea how I might accomplish this? Is there a better way to do this?

    It is a term or a name for what I'm doing by creating these "virtual" columns in another table?
    I found this method looking at the workflow tables Oracles.
    >
    I guess it's just a good TNF. This is the master model / retail Design, sounding more modern? ;)

    Kind regards

  • How can I create a virtual store accout?

    Hi, I bought a TOSHIBA JOURN. E TOUCH, but when I access the online store, I request an email and a password.
    My question is where can I create an account?
    My personal account is 18468.
    I bought a second hand, plese help...

    Sorry for my English.

    > I bought a TOSHIBA JOURN. E TOUCH, but when I access the online store, I request an email and a password

    In your post you said, the personal account is 18468.
    This means that the account has already been created.

    If you want to create the new account, the old account (18468) must be reset to zero.
    Here in the forum you can ask virtual store accounts Toshiba reset.

    I recommend you open the new thread with a request to reset the account.

Maybe you are looking for

  • "Region error" on Tecra 750DVD

    I reinstalled my Tecra 750DVD (new HARD drive) on the recovery CD.I can play region 0 DVD ok and some region 2 ones (freebies of newspapers).I get "Error region" play some region 2 discs - those sold commercially.How can I "say" the machine that I am

  • MAX on Windows 10

    I was not able to find more information on this so I hope that the forums are likely to help him. I have a 10 Home Windows PC I'm trying to install and run a labview program developed on. I installed the 15.0 configuration of the system OR in additio

  • Setup / uninstall no longer works

    I am running Windows Vista Home Premium, 32 bit, the pk 2 on a Dell XPS 410 PC service.  I recently downloaded "SpeedUpMyPc" and now wish to uninstall it.  After clicking on this program in the folder programs, by clicking on the button uninstall, I

  • What HardDiskDrive Ultrabay adapter and which hard drive

    4 questions: (1) using the UltraBay for swaping hot is save that's why Lenovo use ultrabays? (2) for the R60 with sata internal wich ultrabay is require (enhanced or other too?) (3) and which hard drive goes into housing ultrabay IDE or SATA? (4) wil

  • Respond to touch simultaneously

    Hello world I have 3 HSlider in my Flex app, and I would like the user to be able to drag them all together (simultaneously). The problem now is that when the user is dragging a HSlider, the application does not meet the second touch on the other HSl