Am I missing something regarding database queries from BPEL?

Hi,
I'm trying to execute what I would think is a simple query from within a BPEL process against an Oracle 10g database.
I have a root table, meter_reading that has an id, a time, a value, and a foreign key to a meter_reading_type table with a simple id-name-description format.
How do I create a PartnerLink in BPEL that queries for the last reading of a particular type? The SQL is easy. The problem is that with the relationship, I can't find the proper format for a pass-through query so that I can do the subselect AND the select by type (name column).
Also, is it possible with the BPEL PM/OC4J combination to output the queries being generated from Toplink?
I've looked through the toplink docs, but they seem to refer to doing this in Java, not in the toplink_mappings.xml file.
Any help would be appreciated. If I'm missing something obvious, please point it out.
Thanks for your time,
Chris

I am guessing from the examples and from looking around that the only solution to this complexity is stored procs and functions. What happens if you're not allowed to use them? Seems like an awkward part of a product that is owned by Oracle.
C

Similar Messages

  • HT1926 When I go to install it Itunes it says I am missing something that keeps it from installing. It does not give a error code so I am clueless.

    I dont know know what to do . I wont give me a error code it keeps saying that its missing something. Its not specific! It says the installer package is missing something to keep it from installing. I have downloaded it again and its says the same Dx

    It says the installer package is missing something to keep it from installing.
    Try the following user tip:
    "There is a problem with this Windows Installer package ..." error messages when installing iTunes for Windows

  • Tool to get database queries from application

    Hi
    I have to support an application which has oracle as a database but I dont have code for the application.So I want to know the queries run from the application whenever we work on that.So is there any view in oracle which we can use for the same?

    If the application uses a single database session, you can also generate a SQLTrace file to analyse with tkprof by using either Oracle Enterprise Manager to turn on SQL Trace for the session, or use DBMS_MONITOR SESSION_TRACE_ENABLE(session_id, serial_num) - you then have to find the trace file on the datbaas eserver USER_DUMP_DEST and either read manually (the queries are easily visible) or use tkprof to analyze it Using Application Tracing Tools  Among other things tkprof can tell you the top resource consuming SQL statements.

  • Regarding database migration from Oracle to MS SQL

    Hi All,
    In my application, the existing database is oracle. we need to migrate from Oracle db to MS SQL.
    We need procedure is as below
    1.export data from Oracle and keep it in a file.(.dmp)
    2.Import data to MS SQL from the exported oracle file.
    and vice versa from MS SQL to Oracle.
    my question is- is it possible to import .bmp (oracle export data) into MS SQL.
    Please clarify me.

    There are couple of options to get data from Oracle to MS SQL.
    The simplest is to create a linked server in MS SQL that points to Oracle and copy data with a query like select * into my_mssqlTable from oracle.schema.table; via the linked server.
    Some data types will not be supported.
    That is for one time copy.
    If you need a close to real time replication you can use MS replication (I would not recommend because it creates triggers on Oracle tables), or you can use GoldenGate or DataCurrents or other replication products.

  • I am missing something regarding redirection and Stream

    Using Scanner, am I able to redirect on the fly? I am familiar with redirection in C. Is redirection in Java similar? Do I have to redirect in the following manner:
    java myprogram < mytestfile.txtor can I redirect on the fly with Scanner?
    Also, is end of file in Java the same as when I provide Scanner input and hit return?
    What I desire to do is allow both console use and redirection. If the user prefers redirection, then my program will use Scanner and StringTokenizer to parse each line of the file, ignoring /n and sending a long concatenated string as input further along. If the user prefers console, then I have a method that will read a file and the program continues.
    Edited by: 832844 on Feb 24, 2011 8:29 AM

    jverd wrote:
    >
    If you mean a ? b : c, see [url http://download.oracle.com/javase/tutorial/java/nutsandbolts/op2.html]here and/or google for java ternary operator.
    What I would ideally like to do is exactly the following: Allow console input using the keyboard and Scanner or allow redirection into Scanner from a file.That's pretty vague.
    This is not a vague question at all. My desire is to allow a user of my program at their leisure to run the program and provide input from the keyboard. The program will obviously, for simplicity sake, use Scanner. Now if the user happens to have multiple input they do not want to type into the console using their keyboard, they can feel free to have the option of redirecting input from a file.
    Now this is all to be done using:
    Scanner keyboard = new Scanner(System.in)That is it, there are no multiple instances of Scanner. This is the front door of the program and it has the responsibility to accept the following:
    * single-line input from the keyboard with a return following each line of input
    * multiple lines of input from the keyboard via a cut and paste operation such as from a file
    * Redirected input from a file that may have commands spanning multiple lines.
    The problem encapsulated clearly for me is this: Right now my front door uses Scanner. It can handle single line input, as in, type something, hit return, and watch the fireworks. however, if I decide to redirect from a file that contains multiple lines of data or cut-n-paste from the file containing multiple lines of data, my program will have a brain fart and see only each line as input. For example:
    Ex. 1
    Keyboard Input:  This is my input (followed by carriage return)
    Response from the program: Nice job
    Ex. 2
    File Input:  Line 1
                    Line 2
                    Line 3
    Response from the program:  I don't understand, I have only partial data
                                             I don't understand, I have only partial data
                                             I don't understand, I have only partial data
    Ex. 3
    Cut-n-Paste: Line 1
                      Line 2
                      Line 3
    Response from the program:  I don't understand, I have only partial data
                                             I don't understand, I have only partial data
                                             I don't understand, I have only partial dataIt is clear I provided valid data in all three examples. The only difference is I chose to split that data across multiple lines where each line is followed by a carriage return. The program had a brain fart and barfed all over my data. This is not what I want to happen.
    So then how can I do this?
    Edited by: 832844 on Feb 24, 2011 10:37 AM

  • SQL queries against a database view from an external system?

    Hi,
    I have a question about Database views in se11.
    Is it possible to create a database view and that do SQL queries against this  view from an
    external system, Not a SAP system?
    Please, I need you help.
    Best Regards
    Annika

    Hi Annika,
    it is possible , yes... but depends on your database systems in the SAP source DB and the external DB
    (easier if they are the same,  i.e. both ORACLE) - check out with your BASIS team (they have to create something like a "database link" in the external DB system  that you can use to access the tables in the SAP source).
    In the external DB you sure can create a view on these "remote" tables.
    We used this to pull data form SAP DB  to another DB system (both ORACLE based).
    But this is NOT supported by SAP , so be carefull. Below is the restriction for ORACLE (as well for other DB systems )
    see SAP note 581312 "Oracle database: licensing restrictions"
    As of point 3, it follows that direct access to the Oracle database is
    only allowed for tools from the areas of system administration and
    monitoring. If other software is used, the following actions, among
    other things, are therefore forbidden at database level:
    * Querying/changing/creating data in the database
    * Using ODBC or other SAP external access methods
    This means that additional application software is only allowed if this
    accesses the database through SAP interfaces (for example, RFC, SAP J2EE
    or BAPI).
    I would say if you KNOW the tables involved (using valid WHERE conditions and joins )
    and don't start queries from hell (ad-hoc type) wich can bring down your SAP system performance
    you can try it.
    But be warned...
    good luck...
    bye
    yk

  • Upsert of xmltype from given xpath - missing something obvious?

    Version: 10.2.0.*2* EE
    I am trying to do an upsert (update/ insert ) of an xmltype for a given xpath.
    The xml data is being passed as an xmltype, the xpath is a string (varchar2), the new value is a string, varchar2.
    If the node specified by the xpath exists this is trivial using updatexml; of course if the node doesn't exist nothing happens. I can check for the nodes existence using exists node, but I'm coming unstuck trying to figure out how to insert the node.
    All the APIS I can find that insert XML (APPENDCHILDXML,INSERTXMLBEFORE, INSERTCHILDXML) do not take an xpath but require an xmltype. Which means if I am reading this right I have no choice but to parse the xpath varchar2 string to try and construct an xmltype (ugh!).
    I can't find any API that just takes an xpath as a varchar2 and a value and gives me an xmltype. Ideally I don't even want that, would just like an API that returns the updated XML which has either had the xpath updated (or inserted if it didn't exist) with the new value.
    I am not an XML expert but I am pretty handy with SQL and PL/SQL. To me this just seems incredibly cumbersome just to do something as trivial as an upsert, so I am hoping I am missing something obvious!
    Can soemone please set me straight with a pointer or example?
    To top it all off the XML uses namespaces, but they aren't registered, there is no schema registration going on.

    Marco Gralike wrote:
    Couldn't it be done via XQuery, although the database version doesn't really help...That would be possible with a dynamic XQuery expression, but "painful" with a static expression as it would require parsing the XPath, and rebuilding the entire input document with the required modifications.
    I think XSLT would be more efficient in this case.
    Maybe, one day, when the database has XQuery Update Facility, we will be able to do this :
    copy $a := $doc/Address
    modify (
      if ($a/zip)
        then replace value of node $a/zip with "12345"
        else insert node element zip {"12345"} into $a
    return $a
    user12083137 wrote:To me, from a SQL background, I can't believe this simple case is simply not covered.Maybe not as simple as it seems. :)
    The functionality can be simulated via an IF/THEN/ELSE logic, or a DELETE/INSERT sequence.
    For example :
    case when existsNode(doc, xpath) = 1
      then updateXML(
             doc
           , xpath || '/text()'
           , somevalue
      else appendchildxml(
             doc
           , substr(xpath, 1, instr(xpath, '/', -1)-1)
           , xmlelement(
               evalname(substr(xpath, instr(xpath, '/', -1)+1))
             , somevalue
    endor,
    appendChildXML(
      deleteXML(doc, xpath)
    , substr(xpath, 1, instr(xpath, '/', -1)-1)
    , xmlelement(
        evalname(substr(xpath, instr(xpath, '/', -1)+1))
      , somevalue
    )

  • Tracing queries from abap to a custom database via dblink

    I' m connecting to a database by dblink (name magiap).
    I would like to know if somewhere I can trace all the queries from abap to oracle in this specific session , to dbs ='MAGIAP'.
    For istance, i would like that the query "SELECT "DESPARTY1"
    into :v_DESPARTY1
    FROM "T040PARTY"
    WHERE "CODPARTY" = '305142941' will be stored some where (in a file??).
    I would like that parameters - w_CODPARTY- will be substituted and stored in the trace file with the value (305142941), as shown in the previous
    Here is the piece of code ..(a very short example of course)..
    DATA : dbs LIKE dbcon-con_name,
    v_CODPARTY(15),
    v_DESPARTY1(60).
    data : w_CODPARTY(15) value '305142941'.
    dbs = 'MAGIAP'.
    TRY.
    EXEC SQL.
    CONNECT TO :dbs
    ENDEXEC.
    IF sy-subrc <> 0.
    EXEC SQL.
    CONNECT TO :dbs
    ENDEXEC.
    ENDIF.
    IF sy-subrc <> 0.
    * RAISE err_conn_aea.
    ENDIF.
    EXEC SQL.
    set connection :dbs
    ENDEXEC.
    EXEC SQL .
    SELECT "DESPARTY1"
    into :v_DESPARTY1
    FROM "T040PARTY"
    WHERE "CODPARTY" = :w_CODPARTY
    ENDEXEC.
    IF sy-subrc NE 0.
    * rc = 4.
    ENDIF.
    EXEC SQL.
    DISCONNECT :dbs
    ENDEXEC.
    ENDTRY.

    Hi Silvana,
    The SQL statements have been stored in the SQL Cursor Cache, on the database and they will be available until they have been invalidated. You can access the statements at the 'MAGIAP' side and see the last executed queries in the cache.
    You can access bind variables by query on the V$SQL_BIND_CAPTURE table, also.
    On the other hand, you can activate the trace by the statement, below;
    ALTER SYSTEM SET sql_trace = true SCOPE=MEMORY;
    Then, the sql statements will be available in the usertrace file. Please note that you should execute and investigate all the statements that I noted above, at the remote side. Plus, as far as I know that it is not able to distinguish the records by the "dblink name". You should check all the statements and try to figure out what queries have been executed remotely.
    Best regards,
    Orkun Gedik

  • Trace queries from abap to a custom oracle database via dblink

    I' m
    connecting to a database by dblink (name magiap).
    I
    would like to know if somewhere I can trace all the queries from abap to oracle
    in this specific session , to dbs ='MAGIAP'.
    For istance, i would like that the query
    "SELECT "DESPARTY1"
    into :v_DESPARTY1
    FROM "T040PARTY"
    WHERE "CODPARTY" = '305142941' will
    be stored some where (in a file??).
    I would like that parameters - w_CODPARTY- will be substituted and stored in the trace
    file with the value (305142941), as shown in the previous
    Here
    is the piece of code ..(a very short example of course)..
    DATA : dbs LIKE dbcon-con_name,
    v_CODPARTY(15),
    v_DESPARTY1(60).
    data : w_CODPARTY(15) value '305142941'.
    dbs = 'MAGIAP'.
    TRY.
    EXEC SQL.
    CONNECT TO :dbs
    ENDEXEC.
    IF sy-subrc <> 0.
    EXEC SQL.
    CONNECT TO :dbs
    ENDEXEC.
    ENDIF.
    IF sy-subrc <> 0.
    * RAISE err_conn_aea.
    ENDIF.
    EXEC SQL.
    set connection :dbs
    ENDEXEC.
    EXEC SQL .
    SELECT "DESPARTY1"
    into :v_DESPARTY1
    FROM "T040PARTY"
    WHERE "CODPARTY" =
    :w_CODPARTY
    ENDEXEC.
    IF sy-subrc NE 0.
    * rc = 4.
    ENDIF.
    EXEC SQL.
    DISCONNECT :dbs
    ENDEXEC.
    ENDTRY.

    Hi Silvana,
    The SQL statements have been stored in the SQL Cursor Cache, on the database and they will be available until they have been invalidated. You can access the statements at the 'MAGIAP' side and see the last executed queries in the cache.
    You can access bind variables by query on the V$SQL_BIND_CAPTURE table, also.
    On the other hand, you can activate the trace by the statement, below;
    ALTER SYSTEM SET sql_trace = true SCOPE=MEMORY;
    Then, the sql statements will be available in the usertrace file. Please note that you should execute and investigate all the statements that I noted above, at the remote side. Plus, as far as I know that it is not able to distinguish the records by the "dblink name". You should check all the statements and try to figure out what queries have been executed remotely.
    Best regards,
    Orkun Gedik

  • Have anybody copied Queries from "Test" database to "Production database?

    I am looking for the best method to copy queries from one database to another.  From TEST to PRODUCTION.  Other than Copy Express or Copy/Past, is there another recommended approach?  Such as within SQL?

    Hi Alain,
    Copying anything from database A to database B using SQL, means somehow using  SQL command "Insert". Please note that commands like Insert, Update, Delete are NOT SUPPORTED as it might cause data corruption.
    Kind regards
    Mario

  • After downloading a pdf from a website, how can I view the file in Safari 6.0.4 (just as I can in Safari 5.0.6)?  I bet that it's simple, but I've missed something, somewhere, and a solution will be greatly appreciated.

    After downloading a pdf from a website, how can I view the file in Safari 6.0.4 (just as I can in Safari 5.0.6)?  I bet that it's simple, but I've missed something, somewhere, and a solution will be greatly appreciated.

    Hello Kirk,
    Thank's for your efforts, and I just wish that this was the solution.  Unfortunately, it isn't because, after double-clicking on the pdf in the website, it simply "opens" in another Safari window as a black screen - the pdf is there, somewhere, but not visible (either as an icon, or as a document). 
    When I right-click in the black Safari window, where the file is supposed to be, the only option available to display the file is to "Open file in Internet Explorer" (which is not what I want to do).  Other options include saving or printing the pdf, which I don't want until I've confirmed that it's the form that I want.  The same options are offered if I right-click on the file icon in the website.
    Any other suggestions, please?

  • TS1398 what is the trick with getting connected to airport WiFi?  It takes forever to go from the settings portion then to the browser to "accept" terms.  Am I missing something to speed the process?

    what is the trick with getting connected to airport WiFi?  It takes forever to go from the settings portion then to the browser to "accept" terms.  Am I missing something to speed the process?

    OK, I figured out from the various postings on here and way too many hours overnight how to pretty much make the Yoga do what it is supposed to do. I've written up a step by step at this link that may help some of you with your problems as well
    Let me know if this helps!

  • Question regarding Polling data from database using DB Adapters in BPEL

    Hi,
    I have the following question regarding Polling data from database using DB Adapters in BPEL -
    If I am selecting data from multiple tables/view to ultimately generate hierarchical xml document, is there a way that I specify polling all of these tables/views. Is polling limited only to one table/view?
    Thanks
    Ravi

    Hi Ravi,
    your question seems to have been answered for the question of polling a set of tables with one as the root, and getting back a hierarchical xml representing multiple related tables.
    However you can also poll for changes to both the root table and its related tables. Not sure if this was your question or the one already answered. If the former please check out the sample
    bpel/samples/tutorials/122.DBAdapter/advanced/polling/PollingForChildUpdates
    Thanks
    Steve

  • SQL queries from a Citadel database

    We are retrieving data with third-party package SQL queries from a Citadel database. Certain queries for some object members will not return data, but the SQL search application software returns an "error". An analysis of the error from the SQL end does not find problem on SQL side. I suspect corruption of Citadel database. The link to database is good, as most tags do return a value as expected. 
    This problem occurred at the time of re-location of the database to a replacement computer.  Any ideas on how to fix such a problem?

    Can you give an example of the "bad" SQL statement and a good one?
    Ryan Shi
    National Instruments

  • I just went from OS 10.6 to 10.8. The arrow button is gone from the scrollbar. I do not see the option in "Systems Preference" any more. Am I missing something. If it is gone, is Apple going to bring it back?

    I just went from OS 10.6 to 10.8. The arrow button is gone from the scrollbar. I do not see the option in "Systems Preference" any more. Am I missing something. If it is gone, is Apple going to bring it back?

    John R M wrote:
    Thank you. I believe Apple shoud give you the option as to whether or not you may want to use the arrows.
    Apple give users what they want?
    Good luck there, the head of iOS Scott Forstall was canned, I suspect this was his favorite picture.
    However I bring salvation and sanity, the option to go back to the wonderous Snow Kitty.
    How to revert your Mac to Snow Leopard
    How to erase and install Snow Leopard 10.6
    Be sure to vent to Apple for the stupid changes here
    https://www.apple.com/feedback/macosx.html

Maybe you are looking for

  • ALV - Problem with checkbox.

    Dear All, I have created an ALV Grid Control and have one column as a check box. when i tick one checkbox in a line item i pop up a message saying "Do you wish to continue". If the user selects NO then i automatically want to deselect the checkbox. I

  • User password will need be changed when user logon

    Why users need to change the password once I setup when they have been assigned by superuser? If that is the case, then should I just assign any 4 digits then they put the real password when they log on or they can reuse the same password that I crea

  • Debugging a non-working login hook

    I'm setting up labs in a school, some have 2008 iMacs, 2007 iMacs, 2007 Macbooks and powerbook g4's. I have a new 2008 iMac as my master image and I've set-up a LoginHook in com.apple.loginwindow.plist that runs a script that works just great. It doe

  • How 'bout those new Apple Mac ads!

    I love 'em. They are quite funny. See them all here; http://www.apple.com/getamac/ads/

  • Unused paragraphs and character styles in the catalogs?

    How could I delete automatically the unused paragraphs and character styles from the catalogs?