Heirarchical Fetch using SQL or enchanced SQL

The mapping of the tables is such that :
Table A - Composite filter [Child Table - holds only the ids]
Table B - Event Filter [Master Table - holds all details about the filter]
Table C - Event Discount
Table D -Tariff element Discount
Table E - Product
Table F - Tariff
Table G - Product Family
1 Composite filter can be associated to 1 or more composite filters. Event filters are associated to the event discount,Event Discounts are associated to product tariffs and Products and Tariffs are associated to product family.
For a Given product family, we wish to fetch all the filters associated, but we are missing out few records where the composite filters are not directly associated to the discounts (i.e. the filters are associated to other filter)
We tried the below query. But this is not giving the expected resultes.
Can some one help me on this. Please write if u require more inputs on this.
select evtfltr.filter_name,
evtfltr.filter_type_id,
evtfltr.filter_desc,
evetyp.event_type_name,
evtfltr.attribute_number,
evtfltr.max_element_count,
evtfltr.match_type
from eventfilter evtfltr,eventtype evetyp
where evtfltr.event_type_id=evetyp.event_type_id(+)
and evtfltr.event_filter_id in (select event_filter_id
from eventfilter
where event_filter_id in (select distinct discounting_filter_id
from eventdiscount
where event_discount_id in (select event_discount_id
from PVTARIFFELEMENTDISCOUNT2
where product_id in (select product_family_id
from productfamily
where product_family_name = '21CN Services Generic')
and catalogue_change_id IN (Select catalogue_Change_id from cataloguechange where catalogue_status = 3 ))
and catalogue_change_id IN (Select catalogue_Change_id from cataloguechange where catalogue_status = 3 ))
and catalogue_change_id IN (Select catalogue_Change_id from cataloguechange where catalogue_status = 3 )
UNION
select event_filter_id
from compositefilter
where composite_filter_id in (select event_filter_id
from eventfilter
where event_filter_id in (select distinct discounting_filter_id
from eventdiscount
where event_discount_id in (select event_discount_id
from PVTARIFFELEMENTDISCOUNT2
where product_id in (select product_id
from product
where product_family_id= (select product_family_id
from productfamily
where product_family_name = '21CN Services Generic'))
and catalogue_change_id IN (Select catalogue_Change_id from cataloguechange where catalogue_status = 3 ))
and catalogue_change_id IN (Select catalogue_Change_id from cataloguechange where catalogue_status = 3 ))
and catalogue_change_id IN (Select catalogue_Change_id from cataloguechange where catalogue_status = 3 )
and filter_type_id in (4,5)))
and catalogue_change_id IN (Select catalogue_Change_id from cataloguechange where catalogue_status = 3 )

I am been able to fetch the records which are directly associated with the discounts but not the ones which are indirectly associated to the discount.
Table details :
Event Filter ef
Column Name     ID     Pk     Null?     Data Type     Default     Histogram
EVENT_FILTER_ID     1     2     N     NUMBER (9)          Yes
CATALOGUE_CHANGE_ID     2     1     N     NUMBER (9)          Yes
FILTER_NAME     3          N     VARCHAR2 (40 Byte)          Yes
FILTER_TYPE_ID     4          N     NUMBER (9)          Yes
FILTER_DESC     5          Y     VARCHAR2 (255 Byte)          Yes
EVENT_TYPE_ID     6          Y     NUMBER (9)          Yes
ATTRIBUTE_NUMBER     7          Y     NUMBER (2)          Yes
MAX_ELEMENT_COUNT     8          Y     NUMBER (9)          Yes
MATCH_TYPE     9          Y     NUMBER (9)          Yes
Compositefilter cf
Column Name     ID     Pk     Null?     Data Type     Default     Histogram
COMPOSITE_FILTER_ID     1     2     N     NUMBER (9)          Yes
FILTER_NUMBER     2     3     N     NUMBER (9)          Yes
CATALOGUE_CHANGE_ID     3     1     N     NUMBER (9)          Yes
EVENT_FILTER_ID     4          N     NUMBER (9)          Yes
ef.EVENT_FILTER_ID=cf.COMPOSITE_FILTER_ID
cf.FILTER_NUMBER is sequence of filters associated to another filter. 1,2,3,4,5
cf.EVENT_FILTER_ID is associated event filter.
eg
1) One filter name 'A'is associated with discount 'XYZ"
2) filter is 'B','C','D' are associated with Filter 'A' (Composit filter holds this mapping)
We are missing the records for 'B','C','D' .
Will this help and need more clarity.

Similar Messages

  • How to get multiple records using fn-bea:execute-sql()

    Hi,
    I created Proxy service(ALSB3.0) to get records from DB table. I have used Xquery function(fn-bea:execute-sql()). Using simple SQL query I got single record, but my table having multiple records. Please suggest how to get multiple records using fn-bea:execute-sql() and how to assign them in ALSB variable.
    Regards,
    Nagaraju
    Edited by: user10373980 on Sep 29, 2008 6:11 AM

    Hi,
    Am facing the same issue stated above that I couldnt get all the records in the table that am querying in the Proxyservice.
    For example:
    fn-bea:execute-sql('EsbDataSource', 'student', 'select Name from StudentList' ) is the query that am using to fetch the records from the table called StudentList which contains more than one records like
    Id Name
    01 XXX
    02 YYY
    03 ZZZ
    I tried to assign the result of the above query in a variable and while trying to log the variable, I can see the below
    <student>
    <Name>XXX</Name>
    </student>
    I want to have all the records from my table in xml format but it's not coming up. I get the value only from the first row of my table.
    Please suggest.
    regards,
    Venkat

  • Using a custom PL/SQL to populate the primary key in a tabular form

    I want to use a Custom PL/SQL Function to populate the primary key when I insert a new record into a tabular form. I want to get the value from a hidden page Item. The code I am using for the primary key source is:
    BEGIN
    INSERT INTO TEAM_MEMBERS(TEAM_ID)
    VALUES(:P75_TEAM_ID);
    END;
    When I try to insert a new record I get the following error:
    Error      ERR-1904 Unable to compute item default: type = Function Body computation_type= BEGIN INSERT INTO TEAM_MEMBERS(TEAM_ID) VALUES(:P75_TEAM_ID); END; .
    ORA-06550: line 5, column 2: PLS-00103: Encountered the symbol ";" when expecting one of the following: begin case declare end exception exit for goto if loop mod null pragma raise return select update while with << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe The symbol "exit" was substit
    Any ideas what I am doing wrong?
    Thanks!

    Brian - Sometimes whitespace at the end of the block causes this. Be sure to trim everything after the last semicolon including tabs and newlines.
    Scott

  • How to build dynamic query strings in the query using DB adapter 'Pure SQL'

    Dear Forum,
    I am building an application which will access DB to fetch some result set. The query involves retrieving data from multiple tables(nearly 10 tables). So I have created a DB adapter using 'execute pure sql' option. With this query works fine, but my inputs parameters will vary. So I need to make my query dynamic to append the query strings at runtime depending on the inputs.
    For example I have 3 input variables - input1,input2 and input3 (in my request xsd) which are used in the pure sql query. Now if I get a 4th input parameter input4 in the request, I need to append this to query string as 'AND input4=[some value]' at runtime. Otherwise my query should have only 3 parameters. Please suggest how this can be achieved.
    Regards,
    Satya.

    This is a strange requirement, depending on the columns you have and what are optional in them, one way is to have separate operations and each opeartion will have different inputs and for each operation , a different DB Adapter is called. But this way, it results in more number of operations for the service as well as more number of references in the composite. Even if you pass the column inputs to the SQL procedure, it will result in a large number of if-else cases..
    Thanks,
    N

  • Fetch data from another mirosoft sql server to sap

    Dear all,
                   I want to fetch data from another mirosoft sql server
                    to SAP(my sap server IN unix, oracle 10g).
    Thanks
    Shashi
    Moderator Message: Try to do you own research before posting your question. Get back to the forums in case you are stuck with any issue
    Edited by: Suhas Saha on Jul 26, 2011 3:21 PM

    hi,
    u should see following documentation:
    Oracle9i Heterogeneous Connectivity Administrator's Guide
    Release 1 (9.0.1)
    Part Number A88789_01
    in it u just go to chapter no. 4 (using the gateway),,u'll find ur answer there.
    regards
    umar

  • Fetch only required fields from SQL Table

    Hi,
    We have a table like below which will get data thru a job.
    And I'm writing a Job/SP which will fetch 4 fields from that table and send  them in a Email to Admins informing how many new employee are added newly.
    How to loop thru these fields  and not only there might be a chance where we will have 100 records and I need to take only first 30 of them and send.
    EmpId
    Empname
    Deptname
    Designation
     Can any one has any solution on achieving this?
    Thanks

    Please refer the below link:
    http://beyondrelational.com/modules/2/blogs/77/posts/11386/sql-server-t-sql-different-ways-to-generate-a-comma-separated-string-from-a-table.aspx
    You need to use the Top30 query as your table in the script :
    select top 30 EmpID,EmpName,DeptName,Designation
    from tbl_name
    order by EmpID
    Eg: You may need to do for other columns:
    --WARNING: THIS SCRIPT IS PROVIDED AS-IS AND WITHOUT
    -- WARRANTY.
    -- FOR DEMONSTRATION PURPOSES ONLY
    --Step 01: Generate Temp table to store source data
    DECLARE @NamesTable TABLE (Id INT,
    Name NVARCHAR(50))
    --Step 02: Generate test data
    INSERT INTO @NamesTable VALUES (1,'A'),
    (2,'D'),
    (2,'C'),
    (3,'E'),
    (3,'H'),
    (3,'G')
    DECLARE @listIds VARCHAR(MAX) --DO NOT initialize this one!
    SELECT @listIds = COALESCE(@listIds + ',' ,'') + Cast(nt.Id as varchar(10))
    FROM @NamesTable nt Order by ID asc
    DECLARE @listNames VARCHAR(MAX) --DO NOT initialize this one!
    SELECT @listNames = COALESCE(@listNames + ',' ,'') + nt.Name
    FROM @NamesTable nt Order by ID asc
    SELECT 'EmpID: ' + @listIds+', EmpName: ' + @listNames

  • Is it possible to use dbms_debug.execute in SQL Developer?

    Hi.
    I use remote debug and i would like to query some tables during debug. Is it possible?
    I know, that dbms_debug.execute offers functionality to run any sql or pl/sql in target session. Probably, SQL Devleoper already have this functionality?
    Thanks in advance.

    yes, I copied the wrong code into the example - what I actually want to display in a grid is the following:
    CREATE OR REPLACE PACKAGE RSET_CURSOR IS
    cursor rs_cursor is select species, location from ot;
    r_c rs_cursor%rowtype;
    end;
    create or replace package rset_cursor2
    is
    procedure printSpecies;
    end rset_cursor2;
    create or replace package body rset_cursor2
    is
    procedure printSpecies is
    begin
    open rset_cursor.rs_cursor;
    loop
    fetch rset_cursor.rs_cursor into rset_cursor.r_c;
    exit when rset_cursor.rs_cursor%notfound;
    dbms_output.put_line(rset_cursor.r_c.species);
    end loop;
    close rset_cursor.rs_cursor;
    end;
    end;
    I have also just noticed the list I am getting is only including one column of data where it should include 2, have I omitted something?
    Thanks

  • PLEASE HELP ME TO FETCH LAST 3Weeks data in SQL

    I have to display 3 weeks data when the user selects one week.
    In the front end i have start date and end date , after selecting the start and end date i have drop down list which will display the weeks . By passing weekid i need to fetch data for last 3 weeks, is this possible by passing only the week id. and what
    if the user selects the last year as start date and current date as end date....
    for example
    if the user selects week -38
    it should display data for week 38,37 and 36 . this is working if by decrementing the week by 1.
    what if the user selects week 1, it should select the last 2 weeks of previous year as well. how will i do this by using week id...please help 

    Please try following code in which you can change @increament value as you wish.
    --sample DDL & DML
    DECLARE @Table TABLE ( WeekId INT PRIMARY KEY );
    INSERT @Table
    VALUES ( 1 ), ( 2 ),( 3 ), ( 4 ),( 5 ),( 6 ), ( 7 ),( 8 );
    --input parameters
    DECLARE @WeekId INT = 1 ;
    DECLARE @Increament INT = 2 ;
    DECLARE @Mn INT ;
    SELECT
    @Mn = CASE
    WHEN ( SELECT MAX(T2.WeekId) FROM @Table AS T2 WHERE T2.WeekId = T1.WeekId - @Increament ) IS NULL
    THEN ( SELECT MAX(WeekId) FROM @Table ) - @Increament + T1.WeekId
    ELSE ( SELECT MAX(T2.WeekId) FROM @Table AS T2 WHERE T2.WeekId = T1.WeekId - @Increament ) END
    FROM
    @Table AS T1
    WHERE
    T1.WeekId = @WeekId ;
    IF @WeekId < @Mn
    SELECT *
    FROM @Table
    WHERE WeekId <= @WeekId OR WeekId >= @Mn ;
    ELSE
    SELECT *
    FROM @Table
    WHERE WeekId BETWEEN @Mn AND @WeekId ;
    T-SQL Articles
    T-SQL e-book by TechNet Wiki Community
    T-SQL blog

  • SQL DEVELOPER 1.5.3: Export Data options for using SQL to write SQL?

    I write a lot of SQL that generates SQL. In a competitor's product, I can export query results (Export > Save As > Tab Delimited) to the clipboard, paste the generated SQL into a new window, then execute the generated SQL.
    In SQL Developer, using Export Data > Text to the clipboard, it's delimiting each row with double-quotes. Is there any way to turn this behavior off to achieve what I want? Or should I be choosing a different export format?
    For now, I can do a search/replace to eliminate the double-quotes,
    Thanks.
    Dana

    Dana,
    I probably haven't done this with generating thousands of SQL lines, but I have certainly used the Ctrl-A, Ctrl-C (or Ctrl-Shift-C to get headers) to copy thousands of records of result data. Note that the Ctrl-A forces a fetch of all remaining records that have not yet been fetched, which may add to the time taken by the process - for example, running the query fetches the first 50 records and then Ctrl-A will fetch the remaining records as well as selecting them all, however long that takes. Also, there is a noticeable delay with the Ctrl-C for thousands of records - only rough counting but I was seeing a UI freeze for ~ 4 seconds when copying 10000 records from a query with around 30 columns in it (pasting the clipboard into a file produced a file just under 4MB).
    theFurryOne

  • Performance comparison between using sql and pl/sql for same purpose

    Hi All,
    I have to do some huge inserts into a table from some other tables. I have 2 option:
    Option 1
    ======
    a. Declare a cusor for a query involving all source tables, this will return the data to be populated into target
    b. Use a cursor for loop to loop through all the records in the cursor
    c. for each iteration of the loop, populate target columns, do any calculations/function calls required to populate derived columns, and then insert the resulting record into target table
    Option 2
    ======
    Just write a big single "Insert Into ..... Select ..." statement, doing alll calculations/funtion calls in the select statement generating the source data.
    Now my question is ; which option is fast? and why. This operation is performace critical so I need the option which will run faster. Can anybody help???
    Thanks in Advance.

    user9314072 wrote:
    while the above comments are vaild, you should concider maintainability in you code. Even if you can write the sql it might be the code becomes complex making tuning very dificult, and derade performance.Beg to differ on that. Regardless of complexity of code, SQL is always faster than PL/SQL when dealing with SQL data. The reason for that is that PL/SQL still needs to use SQL anyway for row retrieval, and in addition it needs to copy row data from the buffer cache into the PL/SQL PGA. This is an overhead that does not exist in SQL.
    So if you are processing a 100 million rows with a complex 100 line SQL statement, versus a 100 million rows 100 line PL/SQL procedure, SQL will always be faster.
    It is a trade off, my experiance is large SQL's 100's lines long become hard to manage. You need to ask yourself why there are 100's of line of SQL. This points to an underlying problem. A flaky data model is very likely the cause. Or not using SQL correctly. Many times a 100 line SQL can be changed to a 10 liner by introducing different logic that solves the exact same problem easier and faster (e.g. using analytical SQL, thinking "+out-of-the-box+").
    Also, 100's of line of SQL points to a performance issue always. And it does not matter where you move this code logic to PL/SQL or Java or elsewhere, the performance problem will remain. Moving the problem from SQL to PL/SQL or Java does not reduce the number of rows to process, or make a significant change in the number of CPU instructions to be executed. And there's the above overhead mentioned - pulling SQL data into a client memory segment for processing (an overhead that does not exist using SQL).
    So how do you address this then? Assuming the data model is correct, then there are 2 primary methods to address the 100's of SQL lines and its associated performance problem.
    Modularise the SQL. Make the 100's of lines easier to maintain and understand. This can be done using VIEWS and the SQL WITH clause.
    As for the associated performance issue - materialised views comes to mind as an excellent method to address this type of problem.
    my advice is keep things simple, because soon or later you will need to change the code.I'm all for that - but introducing more moving parts like PL/SQL or Java and ref cursors and bulk fetching and so on.. how does that reduce complexity?
    SQL is the first and best place to solve row crunching problems. Do not be fooled into thinking that you can achieve that same performance using PL/SQL or Java.

  • Using MapViewer from PL/SQL vs Java

    Hi group!
    The MapViewer User's Guide has this to say about using MapViewer from PL/SQL:
    "The usage model for the SDO_MVCLIENT package is almost identical to that of
    MapViewer JavaBean-based API" etc etc .. "For usage and reference information about specific functions or procedures, see the description of the associated JavaBean-Based API. methods and interfaces in Chapter 4"
    If I don't misunderstand the basic concept, in a Java Web App (using the MapViewer Bean) you create a MapViewer object for each HTTP-user-session, like so:
    MapViewer mv = new MapViewer("http://my_corp.com:8888/mapviewer/omserver");
    ... which you would then store in the user's session object, so that the MapViewer Bean conveniently holds the map's state on the user's behalf.
    To do the equivalent in PL/SQL, the User's Guide suggests:
    "connect scott/tiger
    call sdo_mvclient.createmapviewerclient(
    'http://www.mycorp.com:8888/mapviewer/omserver') ;
    The preceding example creates, in the current session, a unique MapViewer client
    handle to the MapViewer service URL"
    Does "current session" refer to the HTTP-user-session? While I've used PL/SQL before, I've not used the PL/SQL Web Toolkit. Is the session handling implicit here (and invisible?) or should the sdo_mvclient be subsequently stored in the PL/SQL equivalent of a (J2EE) HttpSession object?
    YT

    Part of the answer will depend on how you plan to deploy the application. If you have a few, local clients you could go with the traditional client/server model. If you have a lot of clients and/or they are spread out over a relatively large area (like a campus setting), a web front-end will save you a lot of hassels down the road when it comes time to upgrade.
    Regardless of the the front end, I can tell you that I have been greatly impressed with the throughput you can get by moving most of the code to PL/SQL packages. A few years ago we reworked a VB/Oracle app by moving a lot of the code out of VB and into packages, leaving the client to essentially call procedures and format the output. We had more than a 3x performance increase on the same hardware and our network utilization decreased noticably.
    I am now in the process of replacing the client code with Java servlets/JSP, primarily because of the maintenance hassles I mentioned earlier. There are some limitations with an HTML page but most of these have been cosmetic so far.
    We are still relying heavily on PL/SQL packages. The servlet code basically gets a request, calls a package to get the data, then hands the results to a JSP page. The JSP then formats the output and sends it to the client. We are little more than halfway through the re-write, but it appears performance will increase again. Not as noticably as before, but I will take what I can get. As you have seen, once something is rolled out it always ends up getting used more than you anticipated. Better to over-engineer now than have to patch it once it is live.
    HTH

  • Can we use different Databases (Oracle & SQL Server) in one report?

    Post Author: venki5star
    CA Forum: .NET
    Hi there.
    Can we use different databases (Oracle & SQL Server) in a same report?
    If possible how?
    Another question,
    Can we change the Provider Name at runtime of the given report. If so the above question is useless...
    Thanks in Advance.

    I tried this using Oracle Provider for OLEDB (the one that supplied by Oracle Client) and Crystal Reports 9. you can drag the column into designer but the image does not appear in preview.
    I guess it's because CR does not recognized it as image, and there are no information that the blob data is an image at all.

  • (new?) performance problem using jDriver after a Sql Server 6.5 to 2000 conversion

    Hi,
    This is similar - yet different - to a few of the old postings about performance
    problems with using jdbc drivers against Sql Server 7 & 2000.
    Here's the situation:
    I am running a standalone java application on a Solaris box using BEA's jdbc driver
    to connect to a Sql Server database on another network. The application retrieves
    data from the database through joins on several tables for approximately 40,000
    unique ids. It then processes all of this data and produces a file. We tuned
    the app so that the execution time for a single run through the application was
    24 minutes running against Sql Server 6.5 with BEA's jdbc driver. After performing
    a DBMS conversion to upgrade it to Sql Server 2000 I switched the jDriver to the
    Sql Server 2000 version. I ran the app and got an alarming execution time of
    5hrs 32 min. After some research, I found the problem with unicode and nvarchar/varchar
    and set the "useVarChars" property to "true" on the driver. The execution time
    for a single run through the application is now 56 minutes.
    56 minutes compared to 5 1/2 hrs is an amazing improvement. However, it is still
    over twice the execution time that I was seeing against the 6.5 database. Theoretically,
    I should be able to switch out my jdbc driver and the DBMS conversion should be
    invisible to my application. That would also mean that I should be seeing the
    same execution times with both versions of the DBMS. Has anybody else seen a
    simlar situation? Are there any other settings or fixes that I can put into place
    to get my performance back down to what I was seeing with 6.5? I would rather
    not have to go through and perform another round of performance tuning after having
    already done this when the app was originally built.
    thanks,
    mike

    Mike wrote:
    Joe,
    This was actually my next step. I replaced the BEA driver with
    the MS driver and let it run through with out making any
    configuration changes, just to see what happened. I got an
    execution time of about 7 1/2 hrs (which was shocking). So,
    (comparing apples to apples) while leaving the default unicode
    property on, BEA ran faster than MS, 5 1/2 hrs to 7 1/2 hrs.
    I then set the 'SendStringParametersAsUnicode' to 'false' on the
    MS driver and ran another test. This time the application
    executed in just over 24 minutes. The actual runtime was 24 min
    16 sec, which is still ever so slightly above the actual runtime
    against SS 6.5 which was 23 min 35 sec, but is twice as fast as the
    56 minutes that BEA's driver was giving me.
    I think that this is very interesting. I checked to make sure that
    there were no outside factors that may have been influencing the
    runtimes in either case, and there were none. Just to make sure,
    I ran each driver again and got the same results. It sounds like
    there are no known issues regarding this?
    We have people looking into things on the DBMS side and I'm still
    looking into things on my end, but so far none of us have found
    anything. We'd like to continue using BEA's driver for the
    support and the fact that we use Weblogic Server for all of our
    online applications, but this new data might mean that I have to
    switch drivers for this particular application.Thanks. No, there is no known issue, and if you put a packet sniffer
    between the client and DBMS, you will probably not see any appreciable
    difference in the content of the SQL sent be either driver. My suspicion is
    that it involves the historical backward compatibility built in to the DBMS.
    It must still handle several iterations of older applications, speaking obsolete
    versions of the DBMS protocol, and expecting different DBMS behavior!
    Our driver presents itself as a SQL7-level application, and may well be treated
    differently than a newer one. This may include different query processing.
    Because our driver is deprecated, it is unlikely that it will be changed in
    future. We will certainly support you using the MS driver, and if you look
    in the MS JDBC newsgroup, you'll see more answers from BEA folks than
    from MS people!
    Joe
    >
    >
    Mike
    The next test you should do, to isolate the issue, is to try another
    JDBC driver.
    MS provides a type-4 driver now, for free. If it is significantly faster,
    it would be
    interesting. However, it would still not isolate the problem, because
    we still would
    need to know what query plan is created by the DBMS, and why.
    Joe Weinstein at BEA
    PS: I can only tell you that our driver has not changed in it's semantic
    function.
    It essentially send SQL to the DBMS. It doesn't alter it.

  • How to use the EBS PL/SQL API from outside PL/SQL

    Hi,
    our attempts to call the stored procedures/functions of the EBS PL/SQL API via JDBC revealed the following issues:
    1. Logical values cannot be exchanged through boolean parameters as the OCI has no notion of this type. Instead we need to write PL/SQL wrappers converting boolean to integer and vice versa. Is that true or are we missing something?
    2. Complex values cannot be exchanged through record types as only PL/SQL code has a notion of this type. Instead we need to write PL/SQL wrappers converting record values to object type values. Is that true or are we missing something?
    3. Types must be defined outside of packages, i.e. in the schema, for whatever reason. Instead we need to write PL/SQL wrappers converting values of types defined in packages to values of types defined in the schema. Is that true or are we missing something?
    4. It is possible to let functions return tables so the results can be queried using SELECT * FROM TABLE. Such functions are called "table functions". Is there something similar for the other direction, i.e. is it possible to call a stored procedure and pass in a table value through an sql INSERT statement?
    5. Do we really have to write all those wrapper routines on our own or is there a PL/SQL library providing such? If not, is there some kind of code generation facility that can generate such wrappers?
    Thanks and Regards,
    Konrad

    Hi Helios,
    I belive its better to move your issue on Forum Home » Database » SQL and PL/SQL which you can get more quick responseYou are probably right! I was thinking about a different forum but I did not see this one. I just posted the question there...
    Still, if somebody has an idea here as well, just let me know ;-)
    Konrad

  • Problem using JDBC and MS SQL Server

    I got a problem trying to acces a database on my SQL Server. I created the table and my connection seems ok, but when i try to get some data from a table, this happens (see below).
    java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'players'.
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6879)
    at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7036)
    at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3065)
    at sun.jdbc.odbc.JdbcOdbcStatement.execute (JdbcOdbcStatement.java:338)
    at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(JdbcOdbcStatement.java:253)
    at Team.<init>(Team.java:18)
    at Simulator.main(Simulator.java:5)
    here's the code that i used to access the db with:
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection conn = DriverManager.getConnection
    ("jdbc:odbc:BRAIN2WINXPPJH","sm","sm");
    Statement stm = conn.createStatement();
    String query = "Select * from players where teamnr = " + nr +
    " order by squadnr";
    ResultSet rs = stm.executeQuery(query);
    any help is more than welcome
    tnx
    Jo

    If all the tables are in the same database, you can use
    Connection.setCatalog("db-name")
    to change the current database. But the suggestion to include the database name in the SQL statement is safer, because you do not need to worry about changing the database at the right point.
    Thomas

Maybe you are looking for

  • Satellite U920T-100: NFC Win 8.1 driver doesn't load

    Hi, as I know the 920T -100 has NFC possibilities ... but I can't install the drivers from support page. While trying, the allow change pops up, yes and then nothing happens. I have unpacked the package with 7zip and started the setup, it is checking

  • Can't open pdf docs

    I just downloaded and installed Adobe Reader XI (Mac), but I still can't open my pdf docs.

  • Kernelbase.dll crash

    Hi Everyone, A Labview application I recently wrote crashed due to an error (code e0434352) in Kernelbase.dll. It had been running for several weeks, so the error really isn't reproducible, but the application is meant to run without any human interv

  • What font folder does iWeb draw from?

    I've created a site and uploaded it to .mac and I've copied the "domain.sites" to another laptop for further editing. The site opens up just fine but a screen pops up saying that the font "Broadview" is missing. It instructs me to add it to the fonts

  • Archives are not being able to ship to standby

    Dear Friends i have installed oracle 9i on linux 4 i have made primary and standby behavior both database's listeners are up primary database is running in read right while standby is in mounted state. both servers are pinging to each other's service