is it possible to reuse variables between sem_match queries?

Hello

I saw examples of the list of the variables in sparql queries link. I'm curious to know if it is possible to bind variables between sem_match queries. Please advice. Thank you very much in advance.

Hong

Hong,

For the scenario you describe, you need to add code to the loop on the first request and then link and run the second query for each result. Similar Java code would be necessary for adapter Jena variables lie as well.

SQL> set serverout on;
declare
  type ctype is ref cursor;
  c       ctype;
  emp_uri varchar2(4000);
  email   varchar2(4000);
begin

  dbms_output.put_line(chr(10));

  open c for
    'select x
     from table(sem_match(
     ''SELECT *
       WHERE
       { ?x rdf:type  }''
     ,sem_models(''m1'')
     ,null,null,null,null
     ,'' ''))';
  loop
    fetch c into emp_uri;
    exit when c%notfound;

    MY_CTXT_PKG.set_attribute('name','<' || emp_uri || '>');

    execute immediate
     'select e
      from table(sem_match(
      ''SELECT *
        WHERE
        { ?x   ?e
          FILTER (sameTerm(?x,oraextf:myCtxFunc("name")))}''
      ,sem_models(''m1'')
      ,null,null,null,null
      ,'' ''))'
    into email;

    dbms_output.put_line('email=['||email||']');

  end loop;
  close c;

end;
/
SQL>   2    3    4    5    6    7    8    9   10   11   12   13   14   15   16   17   18   19   20   21   22   23   24   25   26   27   28   29   30   31   32   33   34   35   36   37   38   39   40   41   42   43 

email=[[email protected]]
email=[[email protected]]
email=[[email protected]]
email=[[email protected]]

PL/SQL procedure successfully completed.

Elapsed: 00:00:00.07
SQL>

In order to reproduce the example of adapter Jena in the docs, you can use three values different session (name1, name2, Name3) to bind in three values at once.

SQL> exec MY_CTXT_PKG.set_attribute('name1','');

PL/SQL procedure successfully completed.

Elapsed: 00:00:00.00
SQL> exec MY_CTXT_PKG.set_attribute('name2','');

PL/SQL procedure successfully completed.

Elapsed: 00:00:00.01
SQL> exec MY_CTXT_PKG.set_attribute('name3','');

PL/SQL procedure successfully completed.

Elapsed: 00:00:00.00
SQL>
SQL> select e, t
  2  from table(sem_match(
  3  'SELECT *
  4   WHERE
  5    { ?x     ?e .
  6       ?x rdf:type ?t
  7       FILTER (sameTerm(?x,oraextf:myCtxFunc("name1")) ||
  8           sameTerm(?x,oraextf:myCtxFunc("name2")) ||
  9           sameTerm(?x,oraextf:myCtxFunc("name3")) )
10    }'
11  ,sem_models('m1')
12  ,null,null,null,null
13  ,' '));

E                   T
------------------------------ ------------------------------
[email protected]               OracleHQEmployee
[email protected]            OracleHQEmployee
[email protected]            OracleHQEmployee

Elapsed: 00:00:00.14

Hope this helps,

Matt

Tags: Database

Similar Questions

  • passing variables between the pop-up windows

    I'm moving one popup to the other variables. It works fien if I spend bvariable of main application as soon as I'm moving from variable popup to popup window it does not work here is what I am trying ro:

    That works fine

    hand. MXML

    private function launchMoreInfo (): void {}
    var win: view = PopUpManager.createPopUp (this, opinion, true) as point of view;
    //

    victory. AccountNum = list1.selectedItem.accountNum;
    Win.User = user;

    }

    But if I try to pass variables to the pop-up window, created from popup component, is not ' work

    View.MXML

    private function dsclientevents (): void {}
    var win2:view = PopUpManager.createPopUp (Thi, dsclienteventlog, true) like point of view;
    //

    win2. AccountNum = 'test ';

    }

    AccountNum is declared in dsclienteventlog.mxml

    Is it possible to pass variables between the pop-up windows?

    I would much apreciate your help

    Thank you

    Hi friend!

    I have faced this kind of problem and solved using 'Public static var '.

    Just, you declare a public static variable in your class Popup. Then you can directly set the value to this variable as,

    ClassName.StaticVariableName = value;

    In your case,.

    say PopUp2.mxml or PopUp2.as

    =======

    In the PopUp1 script:

    OnItemSelectionChange (event): void

    {

    PopUp2.m_iSelectedID = DatagridID.selectedItem.AccountID; It will change the value of this variable, even if the popup2 is open.

    your stuff here...

    }

    Try this, I hope this will help you.

    Thank you

    Merlina.

  • bbUI.js - passing variables between screens

    Hello

    I tried something using the framework bbUI.js and it seems to be pretty easy to use if it becomes more stable in future releases. But I could not find a way to set some global variables between screen-change (push and pop/back). Is it possible to define some vars on the bbUI init and use them on a screen to change the values and also back on the same screen to read values?

    Concerning

    Hello!

    Please search the forums before posting

    http://supportforums.BlackBerry.com/T5/Web-and-WebWorks-development/how-to-pass-params-to-the-next-s...

    See you soon

  • pass variables between form

    Hello

    I use oracle forms 6i.
    How can I pass variables between Forms?
    Consider the scénarion of a login form.
    Once a user logged in successfully, a new form is displayed, where his name is to be displayed
    like '< user > welcome. '
    If name must be past form at the home page login form.

    Is this possible with Oracle?

    Adkins

    Adkins,

    For Global Variables just assign a value to that, and it's initialization. Or you can use

    DEFAULT_VALUE(NULL, 'GLOBAL.');
    

    Make sure that you assign the appropriate value to the global variable before opening the new form.

    And for the parameter, try.

    DECLARE
         Pl_Id PARAMLIST;
    BEGIN
         Pl_Id := GET_PARAMETER_LIST('tempdata');
         IF NOT ID_NULL(Pl_Id) THEN
              DESTROY_PARAMETER_LIST(Pl_Id);
         END IF;
          Pl_Id := CREATE_PARAMETER_LIST('tempdata');
          ADD_PARAMETER(Pl_Id, '', TEXT_PARAMETER, '');
          Open_form('', ACTIVATE, SESSION, Pl_Id);
    END;
    

    Kind regards

    Manu.

    If my answer or the answer to another person has been useful or appropriate, please mark accordingly

    Published by: Manu. April 14, 2010 09:16

  • Passing variables between Forms

    Hi, I am currently working on a rock, paper, scissors project in my class oracle. I was wondering if an oracle form to pass variables between them. I created a login form, and I would once a user logs on to change his user name to one opponent text fields username in the form of game. Is it possible and in this case you may be able to show me an example of passing variables between Forms? Thank you

    You can use the Globals for this purpose. I mean in your login form when your will enter its correct information then and it press OK to the newspaper by so you can for example store their username in the GLOBAL variable

    :GLOBAL.USERNAME:=:FORM.FIELD_NAME;
    

    This global variable, you can access a form any of the current session.

    -Clément

  • Passing variables between LabVIEW and TestStand

    Hello

    I'm just learning how to use TestStand and although there are a multitude of resources available, I always find me at a loss on how to pass variables between TS and LV, leaving me to think that there is one fundamental thing that I'm missing which is likely, given that I have a weeks experience with LabVIEW and a days of experience with TestStand.

    I took a glance to the example of 'Clusters' to the Code Modules in TestStand examples (I use TS 2016 if it matters) because I thought it would be quite ideal for what I hope. In this case, I hope to be able to pass a string (a file path) to LabVIEW and VI power take this string and use it as part of an order for the Exec.VI system.  Then, I would be able to pass strings back to TestStand to show the user if an error occurred, but I thought I should get the first part of work.

    I guess my question is what do I have to wait to see in clusters to the example of the Modules of Code? The Watch window displays all defined variables premise on which has the ContainerOut in the Variables pane, but I don't see any kind of update on facades (VI1.vi and VI2.vi) LabVIEW code. Should I be?

    I looked at a few other discussions of the forum here and here, as well as the document of the basis of knowledge here, but could not recreate their solutions. It seems that the connector pane would be a viable way to go, but I'm not sure on how we create and use effectively. According to this document , it makes it seem like it should be simple enough to makes these terminals, but I am still missing a key step. I was able to follow all the steps on the knowledge base document and run the sequence, but then had no idea if it worked or not; I have the report show me the values of the variables I put, but I have no idea whether or not he actually did anything with the LabVIEW VI, or how I could see that.

    Please let me know if you need further information or clarifaction everything I ask.

    Thank you for your time,
    JColvin

    Digilent, a company of National Instruments

    If you want to enter values, you must create a vi for instance dialog box

    The OK button will allow new values to pass to the output terminals.

    A Cancel button will pass just the original through the output values without alteration. The VI will close when either the OK button or cancel were pressed.

    Concerning

    Ray

  • How to share a variable between the Mathscript Windows and a Mathscript node

    Hello

    I'm trying to share (just) a variable between the Mathscript Windows and a Mathscript node. I don't know why, but the use of the "global" Matlab function makes the mathscript node output formats change.

    I'm looking for a "Mathscript RT V9.0.1 module" as it may seem, there is. French technical support have some difficulty to find...

    Hi patrick33,.

    The code that you have attached should not report an error, so it seems that something has gone wrong with your installation of MathScript. My best guess is that it is the problem that is described in this knowledge base article. Your signature says that you use f3 patch, which is a good start. But the KB lists some other steps to take when you see errors about MathScript, impossible to compile. Can you try the procedure described in the article and let us know if that fixes the problem?

    Thank you

    jattas

    LabVIEW MathScript R & D

  • Is it possible to reuse a disc of windows 7 and buy a new product key?

    Hi all

    I want to use wi made 10 pro 64 bit on my new PC, which will build the next week if the parties appear, and I don't know if I can wait the 29.

    I have a full version of w7 (two disks for 32 and 64-bit) ultimate glc-00182 sku, but used on my old machine and I plan to give this machine for my master's degree for offline games.

    Is it possible to reuse it until I can get w10, like I've just stuck on hold or is there another solution?

    Thank you

    Dave

    Hello

    To add to the advice of Shawn, Amazon.com are about the only place to buy Windows 7 online with a sort of reliability. But beware the buyer is the rule.

    http://www.Amazon.com/Microsoft-Windows-7-8-software/b?ie=UTF8&node=1286119011

    There are sites online that sell only product keys.

    Do not touch the as they are for most pirated product keys or MSDN subscription product keys sold several times.

    Even if you don't need it, always buy the packaged product, DVD, product key, etc. in a sealed package.

    See you soon.

  • Variables between executions of compensation

    Hello

    I'm pretty new to LABVIEW.

    When I run the VI several times it sometimes clears the output fields (for example, a table or a string) and sometimes prevents the results of previous races.

    How can I clear the variables between tracks?

    Thanks in advance

    Yuri

    iurik wrote:

    Hello

    I'm pretty new to LABVIEW.

    When I run the VI several times it sometimes clears the output fields (for example, a table or a string) and sometimes prevents the results of previous races.

    How can I clear the variables between tracks?

    Thanks in advance

    Yuri

    Several ways

    1. you can initialize values before each session

    2. you can use Reset all to default (Invoke node)

    Clear understanding of its best to share the code for

  • Is it possible to pass variables in FledgeController?

    We have some environment variables that change instance of Simulator, and it would be better that we could transmit in the Simulator, rather than having to write them to a file in the application to read running. Is it possible to pass variables in the FledgeController so they can be used as the app system environment variables?

    I don't think it's possible to pass via a command line.  But you can store this value in a file on your hard disk, Simulator one card micro SD and read the file in your application (although you mentioned that you do not want to).

    If you install via a JAD file, you can add the parameter to your JAD file and access them from your application.  But it's probably more complicated than to write a file.

  • is it possible to get variable windows to environment as %username% with javascript?

    is it possible to get variable windows environment such as % username % with javascript using Adobe pro 10?

    Code:

    myTrustedUserName();

    call the function one returns "identity.loginName". You can assign it to a variable:

    var Lname = myTrustedUserName();

    or set a field value

    this.getFieldName("Lname_Field").value = myTrustedUserName();

    or put in an app.alert:

    App.Alert ("username:" + myTrustedUserName());

    or view it in the console

    Console.Show ();

    Console.clear();

    Console.println (myTrustedUserName());

    If you use the table replace "myTrustedUserName()" with "Idefence [loginName]."

    You may need to modify the examples for the name of the field as needed

  • Is it possible to reuse a region in several pages?

    Is it possible to reuse a region in several pages?

    For future maintenance, it would be easier to make changes in the region alone. Keep several copies of a region is more work and eventually someone will not forget to modify one of the regions.

    Thank you.

    Hi wolfv
    Create your area on page 0 and then conditionally set the display of the region for specific pages in your application only.
    In 'condition type' attribute region Select "current page is contained within the Expression 1 (delimited list of pages)" and in Expression 1 set 1,2,4,6,99 etc or pages what ever you want it to appear on.
    This works especially well for parts of the tree.

    concerning
    Paul P

  • Connect the large number of parameters and variables between Verstand and model of Labview

    We have an installer of dyno with a chassis PXI-E running Veristand 2014 and 2014, inertia. In order to strengthen the capabilities and timing of the Veristand, I would use models of Labview to perform tasks is not possible by Veristand and inertia. An example of this is to determine the maximum amount of a large number of thermocouples. VeriStand has a comparison function, but it compares two values at once. This makes long and rigid emissions. LabVIEW, on the other hand, has a function which words one to get the maximum items in a table in one step. I need to use Labview to 'send' the thermocouples of 50 or more to the Labview model. In addition to the variables that must be communicated between Veristand and Labview, I also need to present Labview with the threshold and setting parameters. Forums and user manuaIs understand that you must use the connector pane in Labview Veristand System Explorer mapping to expose the inports and isolated villages. The problem is that the part of Labview connector is limited to 27 I/O. How to overcome this limitation?

    BTW. I'm relatively new to Labview and Versitand.

    Thank you.

    Richard

    You can work around this limitation by putting your orders and clusters indicators. Then set the cluster to be required or recommended to indicate whether contained controls are entered or parameters, just normal.

  • Distribution rules and registry variables between vFoglight facilities

    Hello!

    We are responsible for a number of clients vFoglight facilities. I wonder if there is a more automated way to manage rules vFoglight & variables of register (RV) (alarms). Many of the default rulesettings are questionable. I am looking for a solution where you can pack all your custom rules and RV and then deploy these settings on other facilities at vFoglight.

    I looked through the vFoglight 6.7 guide http://us-downloads.quest.com/Repository/support.quest.com/vFoglight/6.7/Documentation/Management%20Server/vFoglight_CommandLineReference.pdf command-line Reference

    There, on page 119, I found the command of the utility configexport (export or import of a monitoring policy). I already said that if you only keep the changes you made in for example in the rules, you could distribute these through differrent vFoglight facilities, is this correct? Is there someone who has created a script for this in the community?

    I learned that the best practices for managing individual and variable registry rules must copy each rule and RV in the user interface and then configure the new rule with the new RV in the rule editor.

    To do this is a very repetitive task. Is it possible to automate this supported/not supported? Also is it possible to distribute these customized rules & RV between vFoglight facilities, it automate still further?

    Thanks in advance!

    Erik Alm

    Repetitive procedure #1

    Repetitive procedure #2

    Repetitive procedure #3

    Edit

    I had implemented a policy of control of the commandlline with the command:

    fglcmd.bat - usr foglight - pwd - srv - port 443 ssl - cmd - util:configexport f strategy. XML

    When I imported a strategy later. XML where I had deleted all the content with the exception of I reign with the command

    fglcmd.bat - usr foglight - pwd - srv - port 443 ssl - cmd - f policynew.xml util:configimport

    The rule has been changed!

    If (@event.isSet("report/errorMessage")) {}
    Return @event.get("report/errorMessage");
    } else {}
    Return 'Report' + @event.get("report/reportName") + ' run on ' + @event.get("report/dateRun") + 'is fixed. This IS a TEST 20121114 Erik Alm«;»
    }

    The only question is

    1. If I delete all content instead of 1 rule as above nothing has changed

    2. If a problem arises due to an import of strategy 'bad', it can be solved with an import of the backup strategy?

    3. is it possible/safe to distribute the policy like this setting, change the multiple rules/RVs in vFoglight different facilities? With other words, you I configfile change rulesetting in several facilities? (If they are of course the version of fms even)

    4. If the rule/RV is not created/copied before that, these rules/RVs are created?

    5. anyone done this before and created a script that they would like to share?

    Thanks again!

    Erik Alm

    Edit 2

    It seems that it is possible to import new rules and have them appear in the management dashboard with the possibility of enableling rule the. A bug is interesting that they disappear from the new data management dashboard, but are visible in the dashboard management legacy rule.

    1 - does anyone know if the existing rule management dashboard will be removed anytime soon?

    I learned that there is a specific effect is called fglIDE cartridge. I have installed and tested in our product environment. It certainly has a great feature, and we could really use it.

    My respects to Stefan Marx to develop it!

    But I wonder that will be included in the Foglight APM Solution?

    Of http://fglide.apmcentral.org/downloads/

    Disclaimer

    This software is provided as Freeware tools and is not part of the APM Foglight Solution or shipping. It it is not officially supported but if you have any concerns or Questions please use the Foglight community to post these or fill a Github issue

    Or Quest Software has a similar solution that is supported?

    Thanks in advance

  • OOP - how to pass variables between the branches of the object, but not instances of VI

    I have a main VI where a thread object goes through some subVIs initialization and then branches off into several parallel loops. My understanding is that each branch becomes a separate instance of the object. Data is passed between the loops using global variables, wrapped in the accessors (I can change this if someone has a better approach - reducing to a minimum the memory and the CPU usage is very important).

    I need to have a large number of instances of the main VI running at the same time. What would be the best way to ensure that the data transmitted between the loops of one instance of VI do not interfere with the data transmitted between the loops of another instance of VI?

    Thank you for your understanding.

    Ah, you're right. Stupid mistake on my part. It's all working now. The corrected code is attached.

Maybe you are looking for

  • Apps

    I have a systmonline application that will not delete. It just says: 'the waiting' I would appreciate help with this. The app was stupid anyway when it worked!

  • Photosmart 3210 all-in - one: massive leak of hp 3210 ink

    Yellow Ink leakage.  Leaks around paper.  Change of ink cartage.  No change still leaks.

  • How do I transfer music information to file

    I update the content of a music which the artist, title and album art in Windows Media Player. I can transefer that info back to my folder of music files in my documents to reflect changes?

  • Delete emails double in vista

    Had to open a new user account and transfer files.  After a lot of work that I am down to a problem - I duplicate in my Inbox emails - there is just the emails that have been transferred from the old account to the user - not the incoming mail.  Too

  • How wwpn pools

    I created a pool of wwn. Are you 2 wwpn by each wwn? If Yes can I 2 wwpn pools?