How to use Oracle Spatial in this scenario

My scenario is like that:
I'm very new to Oracle Spatial
I'm building an application that will be based on asp.net.(I am
confident about .net)
As per my client requirement there are some kml file in one archive
folder.
Let me give an example:
say there is a kml file for region A.(latitude say 36 n to 40 n and
longitude is 110 w to 115 w) already in the archive folder.
Now if a new kml file(say A1.kml) that has been created by the user
and say its latitude and longitude are respectively 37n and 112w. As we clicked A.kml, google earth is opened up for the region A and as
we move our mouse cursor to more deeper more polygons are visible.
eventually polygon for A1.kml is also visible and definitely which is
inside the polygon for region A.
How can I achieve this thing by using oracle spatial 10g? ---(it's one of my senior's advice to use "oracle spatial 10g" in this scenario)
I'm not too sure whether I can able to make it clear to u about my
situation; plz xcuse me if I'm wasting ur valuable time.

Hi,
This link helped me a lot!
http://www.oracle.com/technology/pub/articles/rubio-mashup.html
Hope it could help you too.
Best regards,
Luiz

Similar Messages

  • How to install Oracle spatial in existing 10g database

    Hi all,
    I am using Oracle 10g 10.2.0.1.0 on Windows.
    How to install Oracle spatial in my database.
    I tried to do with DBCA with configure database option but in that Oracle spatial is in disabled state.
    Please help I am newby to Oracle spatial
    -Thanks & cheers
    Antony

    Hi Xaheer,
    Thank you very much. I run that script, while running the script in some part its showing some errors.
    Could you please tell me whether I have to do some task before executing this script.
    -Thanks & Cheers
    Antony

  • How to use oracle fusion middleware for integration project ?

    hi all,
    in my projects, customer (a bank) already has many applications (bankend & frontend) that are complicatedly connected. I intend to use oracle fusion middleware to integrate all applications and make adding new applications in the future easier. I have worked through documents in the oracle website but I still have no idea how to use oracle fusion middleware to address the requirement, besides oracle fusion middleware includes a bundle of applications I don't know which one I would need.
    could anyone give me some instructions ? appreciate your help.
    thank very much,

    Hi,
    For this short description of environment, could be ODI is a incredible tool to help you...
    Take a look into my blog that has a lot of concepts and "how to do" instructions.... http://odiexperts.com
    However to try help you, what are the used technologies?
    Where are you from?
    Cezar Santos
    http://odiexperts.com

  • How to use oracle.sql.* package?(in nls_charset12.zip)

    is there anyone could tell me how to use the method in this package? for i want to convert a character set from the database (solaris)default character set to the client(win2000) while storing data into ResultSet.
    or anyway that could chnage it would be appricate.
    thanks in advice,

    Hello Gaurav,
    First off, not sure why you are calling
    call.addNamedArgument("JOB_ID", "JOB_ID_I");
    call.addNamedArgumentValue("JOB_ID", jobId);
    You should call the first statement to indicate you will be adding in a "JOB_ID_I" argument to the query, or the second statement to add the value directly to the call, but not both. Calling both indicates your procedure is expecting two parameters called "JOB_ID" and you will get an exception if you do not define the "JOB_ID_I" argument on the query and pass in a parameter for it.
    TopLink does not currently create Oracle objects such as Structs and VARRAYs for you from java objects - atleast not for stored procedures arguments, as it does not know how or what to convert them to. You will need to create the Oracle object type yourself, and pass it into the query. I have not tested it, but it would look something like:
    UnitOfWork unitOfWork = getUnitOfWork();
    StoredProcedureCall call = new StoredProcedureCall();
    call.setProcedureName("DSM_JOB_PKG.INSERT_JOB_RUN_LOG");
    String jobId = jobIdItr.next().toString();
    call.addNamedArgumentValue("JOB_ID_I", jobId);
    Timestamp sysdate = BeanConvertUtil.getCurrentTimestamp();
    call.addNamedArgumentValue("ORDER_DATE_I", sysdate);
    call.addNamedArgumentValue("USER_ID_I", userId);
    Connection con = getSession().getAccessor().getConnection();
    oracle.sql.ArrayDescriptor anArrayDescriptor = new oracle.sql.ArrayDescriptor("GENERIC_STRING_TYPE",con);
    oracle.sql.ARRAY anARRAYin = new ARRAY(anArrayDescriptor, con, paramTypeIds );
    call.addNamedArgumentValue("JOB_PARAM_TYPE_IDS_I", anARRAYin );
    oracle.sql.ARRAY anARRAYin2 = new ARRAY(anArrayDescriptor, con, paramValues);
    call.addNamedArgumentValue("JOB_PARAM_VALUES_I", anARRAYin2 );
    session.executeSelectingCall(call);

  • Quick and easy way to learn to use Oracle Spatial?

    Could anyone recommend a quick and easy way to learn to use Oracle Spatial?

    Depends on your style.
    Reminds me of a story a contractor to an IT department I worked in once told me.
    He used to work in Silicon Valley in the '70s and told a story of a company that
    hired a particular programmer who was brilliant but unstable. They used to set
    up a room with a VT100 and a bottle of Tequila. The programmer would arrive
    and set to work. As the Tequila emptied it was replaced. At some point over
    the following days or weeks a scream would be heard from the room, followed
    by a crash as the VT100 went through the window and the programmer disappeared.
    They would replace the window, the VT100, the Tequila and wait till he came back
    from "walkabout".
    "Extreme Programming" '70s tyle!
    OH&S would never allow this nowadays! That, plus Prozac means these sorts
    of programmers are probably very rare!
    Cheers!
    S.

  • How to use Oracle partitioning with JPA @OneToOne reference?

    Hi!
    A little bit late in the project we have realized that we need to use Oracle partitioning both for performance and admin of the data. (Partitioning by range (month) and after a year we will move the oldest month of data to an archive db)
    We have an object model with an main/root entity "Trans" with @OneToMany and @OneToOne relationships.
    How do we use Oracle partitioning on the @OneToOne relationships?
    (We'd rather not change the model as we already have millions of rows in the db.)
    On the main entity "Trans" we use: partition by range (month) on a date column.
    And on all @OneToMany we use: partition by reference (as they have a primary-foreign key relationship).
    But for the @OneToOne key for the referenced object, the key is placed in the main/source object as the example below:
    @Entity
    public class Employee {
    @Id
    @Column(name="EMP_ID")
    private long id;
    @OneToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="ADDRESS_ID")
    private Address address;
    EMPLOYEE (table)
    EMP_ID FIRSTNAME LASTNAME SALARY ADDRESS_ID
    1 Bob Way 50000 6
    2 Sarah Smith 60000 7
    ADDRESS (table)
    ADDRESS_ID STREET CITY PROVINCE COUNTRY P_CODE
    6 17 Bank St Ottawa ON Canada K2H7Z5
    7 22 Main St Toronto ON Canada     L5H2D5
    From the Oracle documentation: "Reference partitioning allows the partitioning of two tables related to one another by referential constraints. The partitioning key is resolved through an existing parent-child relationship, enforced by enabled and active primary key and foreign key constraints."
    How can we use "partition by reference" on @OneToOne relationsships or are there other solutions?
    Thanks for any advice.
    /Mats

    Crospost! How to use Oracle partitioning with JPA @OneToOne reference?

  • How to use bind variables in this procedure

    Hi Experts,
    How to use bind variables in this procedure for static queries.
    PROCEDURE DELETE_MER_PROC (M_id IN NUMBER)
    IS
    BEGIN
    V_date DATE;
    SELECT PD_DATE INTO v_date FROM PD_MAINTAIN;
        DELETE FROM MER_CLEAR
        WHERE MER_DT < v_date
        AND ID = M_ID;
    COMMIT;
    END;   
    How to use  v_date and m_id as bind variables in this procedure to avoid hard parsing.
    Please help me.
    Thanks.

    976208 wrote:
    How to use  v_date and m_id as bind variables in this procedure to avoid hard parsing.
    You cannot avoid hard parsing - as the 1st time a SQL statement (like the SELECT or DELETE statements in your code) is encountered, it does not reside in the server's Shared Pool, and needs to be added into the pool via a hard parse.
    Bind variables does not prevent hard parsing. Hard parsing happens when the SQL statement (with or without bind variables) is a brand new statement encountered by the server.
    Bind variables enables the same SQL cursor to be reused, by simply changing the bind variable value.
    Not using bind variables means that each SQL statement is unique and not shareable - as the value is hardcoded into the statement and cannot be changed via a bind value. This typically means LOTS of different SQL statements (where the only difference is the changed value in the statement) are created - with each statement being a new statement not seen before in the Shared Pool and needing to be hard parsed.
    One does not design one's code not to be hard parsed. There ALWAYS will be a hard parse in order to get a SQL statement into the Shared Pool. One designs one's code to REUSE cursors in the Shared Pool.

  • How to use shift register in this structure?

    Dear All,
    In order to use less variety of graph, I want to use shift register to manage and send data to graph.
    But there is not only event structure in my vi, for some reason(because I want to use only one button to control running and stop, and this must do through variety of button, I can't put this loop into the event structure) I must use other while loops, I don't know how to use shift register in this structure.
    Please tell me anything helpful.
    Thank you!
    Attachments:
    shift register.vi ‏26 KB

    hi there
    there are a lot of solutions. my favorite one is the usage of a so called "FGV" (functional global variable). this allows you to strore, manipulate and transport data through your app with a minimum of wires. see attachment.. (other users may have other favorite solutions...)
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"
    Attachments:
    Shift Register 7.1.zip ‏20 KB

  • How to use Oracle refcursor dataset output parameter from SP

    Can I request for help on how to use Oracle Output parameter from a stored procedure as a source. I need the output tobe stored in a flat file
    Thanks
    Abhijit
    Message was edited by:
    Abhijit77

    yes I would like to use it for ODI.. I would like the ouput of the refcursor to be fed to a text file using ODI. How to handle the records returned by the refcursor and map with txt file.

  • How to use parrallel cursor in this code

    hi can anyone expalin me how to use parallel cursor for this code ... 
    loop at itabkpf.
          read table ibsegpar_fu with key
                     belnr = itabkpf-belnr
                     gjahr = itabkpf-gjahr
                     bschl = '25' .
    Start insert by Pradeep 20082008
          sort: itabkpf by belnr,
                itabsegpar by belnr.
    End insert by Pradeep 20082008
          if sy-subrc = 0. "Deleted by pradeep 20082008
            select bukrs belnr gjahr bschl koart lifnr wrbtr
                   wskto pswbt zfbdt augbl augdt sgtxt rebzg rebzj
                   into corresponding
                   fields of table ibsegpar_fu_1 from bseg
                   where bukrs = itabkpf-bukrs and
                   belnr = itabkpf-belnr and
                   gjahr = itabkpf-gjahr and
                   augbl <> itabkpf-belnr and
                   rebzg <> space and
                   bschl = '25'.
            loop at ibsegpar_fu_1.
    Start insert by Pradeep 20082008
              sort ibsegpar_fu_1 by belnr.
    End insert by Pradeep 20082008
              move-corresponding ibsegpar_fu_1 to itabseg.
              move ibsegpar_fu_1-belnr to itabseg-augbl.
              move ibsegpar_fu_1-rebzg to itabseg-belnr.
              move ibsegpar_fu_1-rebzj to itabseg-gjahr.
    *********to include code to pick the description for partical payment
              select single * from bseg where
                  bukrs = ibsegpar_fu_1-bukrs and
                  belnr = ibsegpar_fu_1-belnr and
                  gjahr = ibsegpar_fu_1-gjahr and
                  augbl <> ibsegpar_fu_1-belnr and
                  rebzg = space and
                  bschl <> '25'.
              move bseg-sgtxt to itabseg-sgtxt.
              clear bseg.
    *********end of code
              itabseg-wrbtr = itabseg-wrbtr * -1.
              itabseg-pswbt = itabseg-pswbt * -1.
              select single budat into lsdat from
                   bkpf where bukrs = ibsegpar_fu_1-bukrs and
                   belnr = ibsegpar_fu_1-rebzg and
                   gjahr = ibsegpar_fu_1-rebzj.
              if sy-subrc = 0.
                move lsdat to itabseg-zfbdt.
              endif.
              append itabseg.
            endloop.
          endif. "Deleted by Pradeep 20082008
        endloop.
        loop at ibsegpar_fu.
          sort ibsegpar_fu by belnr. " insert by pradeep
          move-corresponding ibsegpar_fu to itabseg.
          select bukrs belnr gjahr bschl koart lifnr wrbtr
                 rebzg rebzj sgtxt into corresponding
                 fields of table ibsegpar_fu_1 from bseg
                 where  bukrs = ibsegpar_fu-bukrs and
                 gjahr = ibsegpar_fu-gjahr and
                 augbl = ibsegpar_fu-belnr and  " Pradeep 20082008 Delete
                augbl <> ibsegpar_fu-belnr and " Pradeep 20082008 Insert
                 rebzg = space and
                 bschl = '25'.
          if sy-subrc = 0.
            loop at ibsegpar_fu_1.
              move ibsegpar_fu_1-rebzg to itabseg-rebzg.
              move ibsegpar_fu_1-rebzj to itabseg-rebzj.
            endloop.
            move ibsegpar_fu-belnr to itabseg-augbl.
            move itabseg-rebzg to itabseg-belnr.
            move itabseg-rebzj to itabseg-gjahr.
            itabseg-wrbtr = itabseg-wrbtr * -1.
            itabseg-pswbt = itabseg-pswbt * -1.
            select single budat into lsdat from
                 bkpf where bukrs = ibsegpar_fu-bukrs and
                 belnr = itabseg-rebzj and
                 gjahr = itabseg-rebzj.
            if sy-subrc = 0.
              move lsdat to itabseg-zfbdt.
            endif.
            append itabseg.
            read table itabseg with key
                 belnr = itabseg-rebzg
                 gjahr = itabseg-rebzj
                 bschl = '31' .
            if sy-subrc = 0.
             delete itabseg index sy-tabix. "Deleted by Pradeep 20082108
            endif.
          endif.
        endloop.
    Start insert by Pradeep 20082008
         loop at itabseg.
          if itabseg-belnr = itabseg-augbl.
            delete itabseg.
          elseif itabseg-belnr = ' '.
            delete itabseg.
          endif.
        endloop.
    End insert by Pradeep 20082008

    hi can anyone expalin me how to use parallel cursor for this code ... 
    loop at itabkpf.
          read table ibsegpar_fu with key
                     belnr = itabkpf-belnr
                     gjahr = itabkpf-gjahr
                     bschl = '25' .
    Start insert by Pradeep 20082008
          sort: itabkpf by belnr,
                itabsegpar by belnr.
    End insert by Pradeep 20082008
          if sy-subrc = 0. "Deleted by pradeep 20082008
            select bukrs belnr gjahr bschl koart lifnr wrbtr
                   wskto pswbt zfbdt augbl augdt sgtxt rebzg rebzj
                   into corresponding
                   fields of table ibsegpar_fu_1 from bseg
                   where bukrs = itabkpf-bukrs and
                   belnr = itabkpf-belnr and
                   gjahr = itabkpf-gjahr and
                   augbl <> itabkpf-belnr and
                   rebzg <> space and
                   bschl = '25'.
            loop at ibsegpar_fu_1.
    Start insert by Pradeep 20082008
              sort ibsegpar_fu_1 by belnr.
    End insert by Pradeep 20082008
              move-corresponding ibsegpar_fu_1 to itabseg.
              move ibsegpar_fu_1-belnr to itabseg-augbl.
              move ibsegpar_fu_1-rebzg to itabseg-belnr.
              move ibsegpar_fu_1-rebzj to itabseg-gjahr.
    *********to include code to pick the description for partical payment
              select single * from bseg where
                  bukrs = ibsegpar_fu_1-bukrs and
                  belnr = ibsegpar_fu_1-belnr and
                  gjahr = ibsegpar_fu_1-gjahr and
                  augbl <> ibsegpar_fu_1-belnr and
                  rebzg = space and
                  bschl <> '25'.
              move bseg-sgtxt to itabseg-sgtxt.
              clear bseg.
    *********end of code
              itabseg-wrbtr = itabseg-wrbtr * -1.
              itabseg-pswbt = itabseg-pswbt * -1.
              select single budat into lsdat from
                   bkpf where bukrs = ibsegpar_fu_1-bukrs and
                   belnr = ibsegpar_fu_1-rebzg and
                   gjahr = ibsegpar_fu_1-rebzj.
              if sy-subrc = 0.
                move lsdat to itabseg-zfbdt.
              endif.
              append itabseg.
            endloop.
          endif. "Deleted by Pradeep 20082008
        endloop.
        loop at ibsegpar_fu.
          sort ibsegpar_fu by belnr. " insert by pradeep
          move-corresponding ibsegpar_fu to itabseg.
          select bukrs belnr gjahr bschl koart lifnr wrbtr
                 rebzg rebzj sgtxt into corresponding
                 fields of table ibsegpar_fu_1 from bseg
                 where  bukrs = ibsegpar_fu-bukrs and
                 gjahr = ibsegpar_fu-gjahr and
                 augbl = ibsegpar_fu-belnr and  " Pradeep 20082008 Delete
                augbl <> ibsegpar_fu-belnr and " Pradeep 20082008 Insert
                 rebzg = space and
                 bschl = '25'.
          if sy-subrc = 0.
            loop at ibsegpar_fu_1.
              move ibsegpar_fu_1-rebzg to itabseg-rebzg.
              move ibsegpar_fu_1-rebzj to itabseg-rebzj.
            endloop.
            move ibsegpar_fu-belnr to itabseg-augbl.
            move itabseg-rebzg to itabseg-belnr.
            move itabseg-rebzj to itabseg-gjahr.
            itabseg-wrbtr = itabseg-wrbtr * -1.
            itabseg-pswbt = itabseg-pswbt * -1.
            select single budat into lsdat from
                 bkpf where bukrs = ibsegpar_fu-bukrs and
                 belnr = itabseg-rebzj and
                 gjahr = itabseg-rebzj.
            if sy-subrc = 0.
              move lsdat to itabseg-zfbdt.
            endif.
            append itabseg.
            read table itabseg with key
                 belnr = itabseg-rebzg
                 gjahr = itabseg-rebzj
                 bschl = '31' .
            if sy-subrc = 0.
             delete itabseg index sy-tabix. "Deleted by Pradeep 20082108
            endif.
          endif.
        endloop.
    Start insert by Pradeep 20082008
         loop at itabseg.
          if itabseg-belnr = itabseg-augbl.
            delete itabseg.
          elseif itabseg-belnr = ' '.
            delete itabseg.
          endif.
        endloop.
    End insert by Pradeep 20082008

  • How to Use Oracle 8i with MapX?

    I am trying to work with oracle 8i 1.6 and mapX 4.5 but un-able to do so. I tried by adding server layer but couldn't do so.
    Help !!

    Crossposted: Re: How to use Oracle partitioning with JPA @OneToOne reference?

  • How to Use Oracle Coherence in BPEL 11g

    i have a scenario to cache the results some where, so that i can make use of the same for the same request.
    I hope this can be done using Oracle Coherence. Could you please let me know how can i use this coherence for cacheing in BPEL 11g (in my bpel process)
    thanks for the help in advance.

    Hi.
    U can use the Coherence API within a Spring bean.
    Take a look at this https://blogs.oracle.com/jaylee/entry/accessing_coherence_cluster_using_spring
    That's one way to do it.
    best

  • How to use Oracle Table Type values in Select Statement.

    Hi,
    I am fetching initial set of values into Oracle Table of Records Type and want to use list of values in the Select statement.
    For example, try something like the following:
    TYPE t_record IS RECORD (
    ID TABLEA.ID%type,
    NO TABLEA.NO%type,
    v_record t_record;
    TYPE t_table IS TABLE OF v_record%TYPE;
    v_table t_table;
    -- Code to populate the values in v_table here.
    SELEC ID,NO, BULK COLLECT INTO <some other table variabes here> FROM TABLEA
    WHERE ID IN v_table(i).ID;
    I want to know how to use the values from Oracle Table Type in the Select Statement.

    Something like this:
    create or replace type t_record as  object (
    id number,
    no number
    CREATE or replace type t_table AS TABLE OF t_record;
    set serveroutput on
    declare
      v_table t_table := t_table();
      v_t1 t_table := t_table();
    begin
      v_table.extend(1);
      v_table(1).ID := 1;
      v_table(1).No := 10;
      v_table.extend(1);
      v_table(2).ID := 2;
      v_table(2).ID := 20;
      SELEC t_record (ID,NO) BULK COLLECT INTO v_t1
      from TableA
      FROM TABLEA
      WHERE ID IN (select t.ID from table(v_Table) t);
      for i in 1..v_t1.count loop
        dbms_output.put_line(v_t1(i).ID);
        dbms_output.put_line(v_t1(i).No);
      end loop;
    end;
    /Untested!
    P;
    Edited by: bluefrog on Mar 5, 2010 5:08 PM

  • How to use oracle collection type with JDBC?

    I try to use oracle collection type in java program. So I made some package and java program, however Java program was not found "package.collectiontype"(JDBC_ERP_IF_TEST.NUM_ARRAY) . please, show me how to use this.
    Java Version : Java 1.4
    JDBC Driver : Oracle Oci Driver
    DB: Oracle 9i
    No 1. Package
    ===========================================
    create or replace package JDBC_ERP_IF_TEST AS
    type NUM_ARRAY is table of number;
    procedure JDBC_ERP_IF_ARRAY_TEST(P_NUM_ARRAY IN NUM_ARRAY, ERR_NO OUT NUMBER, ERR_TEXT OUT VARCHAR2);
    procedure TEST(ABC IN NUMBER);
    END JDBC_ERP_IF_TEST;
    ==================================================
    No 2. Package Body
    ===============================================
    CREATE OR REPLACE package BODY JDBC_ERP_IF_TEST is
    procedure JDBC_ERP_IF_ARRAY_TEST(p_num_array IN NUM_ARRAY,
    ERR_NO OUT NUMBER,
    ERR_TEXT OUT VARCHAR2) is
    begin
    ERR_NO := 0;
    ERR_TEXT := '';
    dbms_output.enable;
    for i in 1 .. p_num_array.count() loop
    dbms_output.put_line(p_num_array(i));
    insert into emp (empno) values (p_num_array(i));
    commit;
    end loop;
    EXCEPTION
    WHEN OTHERS THEN
    ERR_NO := SQLCODE;
    ERR_TEXT := ERR_TEXT ||
    ' IN JDBC INTERFACE TEST FOR ORACLE ERP OPEN API..';
    ROLLBACK;
    RETURN;
    end JDBC_ERP_IF_ARRAY_TEST;
    procedure TEST(ABC IN NUMBER) IS
    begin
    insert into emp(empno) values (ABC);
    commit;
    end TEST;
    end JDBC_ERP_IF_TEST;
    ===============================================
    NO 3. Java Program
    ===============================================
    ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor("JDBC_ERP_IF_TEST.NUM_ARRAY", getConnection());
    ARRAY array = new ARRAY(descriptor, getConnection(), arrs);
    cstmt = getConnection().prepareCall(LQueryFactory.getInstance().get("Meta/Basic/testJdbcErpArrayIf").getSql());
    cstmt.setArray(1, array);
    cstmt.registerOutParameter(2, Types.INTEGER);
    cstmt.registerOutParameter(3, Types.VARCHAR);
    ====================================================
    couldn't find this phase => JDBC_ERP_IF_TEST.NUM_ARRAY
    what can i do for this package and program? please help me..

    Something like this:
    create or replace type t_record as  object (
    id number,
    no number
    CREATE or replace type t_table AS TABLE OF t_record;
    set serveroutput on
    declare
      v_table t_table := t_table();
      v_t1 t_table := t_table();
    begin
      v_table.extend(1);
      v_table(1).ID := 1;
      v_table(1).No := 10;
      v_table.extend(1);
      v_table(2).ID := 2;
      v_table(2).ID := 20;
      SELEC t_record (ID,NO) BULK COLLECT INTO v_t1
      from TableA
      FROM TABLEA
      WHERE ID IN (select t.ID from table(v_Table) t);
      for i in 1..v_t1.count loop
        dbms_output.put_line(v_t1(i).ID);
        dbms_output.put_line(v_t1(i).No);
      end loop;
    end;
    /Untested!
    P;
    Edited by: bluefrog on Mar 5, 2010 5:08 PM

  • How to use oracle OCIANYDATASET?

    Hi, All
    When I try to update oracle example "Pipelined Table Functions Example: C Implementation" to return OCIANYDATASET, but from oracle documnet, I cannot find any example about how to use OCIANYDATASET, would you please help me out of this issue, any example or advice is benefit for this issue. thanks.
    The PL/SQL below works OK now:
    member function ODCITableFetch(self in out StockPivotImpl, nrows in number,  record_out out anydataset) return number is
      rc SYS_REFCURSOR;
      value  pls_integer;
      cur StockTable%ROWTYPE;
      begin
        record_out := null;
         DBMS_ODCI.RestoreRefCursor(rc, self.cur_n);
        if row_was_returned = 1 then
          return ODCIconst.success;
        end if;
        row_was_returned := 1;
        anydataset.begincreate(dbms_types.typecode_object, self.row_types, record_out);
         loop
              fetch rc into cur;
              EXIT WHEN rc%NOTFOUND;
              record_out.addinstance;
            record_out.piecewise();
              -- Setting the returned values:
              record_out.setvarchar2(cur.ticker);
              record_out.setnumber  (cur.openprice);
              record_out.setnumber  (nrows);
              record_out.setvarchar2('new_column');
         end loop;     
         close rc;
        record_out.endcreate;
        return odciconst.success;
      end;But how to implement below C function, especially how to append value into OCIAnyDataSet and return it?
    -- Create table function
    CREATE FUNCTION StockPivot(p refcur_pkg.refcur_t) RETURN anydataset
    PIPELINED USING StockPivotImpl;
    SELECT * FROM TABLE(StockPivot(CURSOR(SELECT * FROM StockTable)));
      MEMBER FUNCTION ODCITableFetch(self IN OUT StockPivotImpl, nrows IN NUMBER,
                                     record_out out anydataset) RETURN PLS_INTEGER
        AS LANGUAGE C
        LIBRARY StockPivotLib
        NAME "ODCITableFetch"
        WITH CONTEXT
        PARAMETERS (
          context,
          self,
          self INDICATOR STRUCT,
          nrows,
          record_out,
          record_out INDICATOR,
          RETURN INT
    int ODCITableFetch(OCIExtProcContext* extProcCtx, StockPivotImpl* self,
                           StockPivotImpl_ind* self_ind, OCINumber* nrows,
                           OCIAnyDataSet* outSet, short* outSet_ind)Edited by: BluShadow on 11-Apr-2013 10:42
    added {noformat}{noformat} tags for readability.  Please read the FAQ: {message:id=9360002} and learn to do this yourself in future.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Thanks for your reply, Yes, I have read the doc, but it seems like that doesn't work in my code. I'm not sure whether I missed something. My steps below:
    int ODCITableFetch(OCIExtProcContext* extProcCtx, StockPivotImpl* self,
                        StockPivotImpl_ind* self_ind, OCINumber* nrows,
                        OCIAnyDataSet* outSet, short* outSet_ind)
    OCIAnyData* myData = (OCIAnyData*)0;
    status = OCIAnyDataSetBeginCreate(handles.svchp, handles.errhp, OCI_TYPECODE_OBJECT, (OCIType *)self->out, OCI_DURATION_SESSION, &outSet);
    status = OCIAnyDataSetAddInstance(handles.svchp, handles.errhp, outSet, &myData);
    //AAA
    OCIStringAssignText(handles.envhp, handles.errhp, (text *)"CA", 2, &str);
    checkerr(&handles, OCIAnyDataAttrSet(handles.svchp, handles.errhp, (OCIAnyData*)myData, (OCITypeCode)OCI_TYPECODE_VARCHAR2,(OCIType *)0, (dvoid *)&indp, (void*)str, sizeof(str), FALSE)); // Crashed here
    //BBB
    status = OCIAnyDataSetEndCreate(handles.svchp,handles.errhp, outSet);
    //CCC
    return ODCI_SUCCESS;
    It crashed in function OCIAnyDataAttrSet(), but when I added the function OCITypeByName() and OCIAnyDataBeginCreate() in AAA and OCIAnyDataEndCreate() in BBB, no error happened again and I can get the instance in CCC with function OCIAnyDataSetGetInstance() and I also can get the value via function OCIAnyDataAttrGet() after CCC from the instance, but when I run the query, it is no rows selected, why?

Maybe you are looking for

  • Query Designer restricted key figures using a prompt value

    Hallo Experts, I would like to restrict key figures after user has beeen prompted to enter a date. I have 2 key figures: a) KF1, Date1 b) KF2, Date2 User should be prompted to select a specific date: e.g. 01/2011. After selecting/entering the prompte

  • Skype video calls .

    When I make a video call to someone and they accept it the call stops and I get this message "Problem with Recording Device". If they call me and I accept it there's no problem.  How to fix this ? Thanks.

  • UTF-16 and file names

    Hi, On Windows (2K & XP atleast) you can have file names containing characters that are represented using UTF-16. E.g. The unicode character \ubf3f (decimal equivalent 48959). Below is a snippet of code that attempts to create a file containing this

  • List of unused Material Masters

    Hi All, I would like to know the process to view the material masters which have not been used so farin my SAP System.i.e with that i not made any sales,Purchases and transfers. Please suggest the Proper T-Code for viewing the same. Thanks, Vinay

  • Raw Processing Support for Canon D5

    Is this in the current 1.01 version of Aperture. I thought it was but saw some posts that make me rethink my recollection.