Replicate an oracle view with SLT

Hi -
Using Oracle 11g and SLT 2011_1_731 Patch 7 with Hana rev 82
I am trying to replicate oracle views in hana through SLT
Scenario 1:
tables T2 and T3 with View T2_T3_view
If I follow this thread  SLT view replication
It creates the view as a table in hana  but does not populate it with any data.
Scenario 2 -
I have 2 oracle tables - T4 and T5.  I have a view T4_T5_VIEW that joins the 2 tables.
I followed steps in a document I received to replicate the view syntax as well as the tables.
1) replicated both tables T4 and T5 - success
2) stopped replication on T4
    table exists in hana with data but no replication
3) using LTRS, assigned the view T4_T5_VIEW to table T4
4) changed the performance option
5) restarted replication on T4
The view gets created as a table, but table T4 gets and error and does not replicate.
The view gets no data
What is the proper process for an oracle table?
I have a very complex view with 5 source tables I want to replicate.
Thanks
Diane

sorry,
with the query
SELECT TAB2.COD_M ,
COUNT(TAB1.COD_MAT) count_mat
FROM TAB2,
TAB1
WHERE TAB2.COD_R (+) = TAB1.COD_MAT
AND TAB1.COD_R IN ('1','3')
GROUP BY TAB2.COD_M
I get:
COD_M..........COUNT_MAT
00114940...........1
00116220...........1
00116300...........2
00119320...........1
00119450...........1
...................0
but I'd like to get this output:
COD_M..................count_mat
00114940...................1
00114949...................0
00116220...................1
00116300...................2
00119324...................0
00119450...................1

Similar Messages

  • Oracle Views with input

    Oracle Version:Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64
    Hi Experts,
    Is it possible to write a view with input and with IN clause in where cluase ....For Example I want to create a view like Below ..
    The below query may be syntactically wrong , but my intension of writing is similary to this. And the query should contain a IN caluse and A union as below...
    create or replace VIEW view_name (col1,col2, P_inputparam VARCHAR2)
    as
    SELECT Col1,Col2
    FROM table_name1
    where any_column11 in (
    &P_inputparam
    UNION
    SELECT Col1,Col2
    FROM table_name2
    where any_column22 in (
    &P_inputparam
              Thanks In advance.
    Edited by: 883279 on May 10, 2013 1:41 AM

    883279 wrote:
    Oracle Version:Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64
    Hi Experts,
    Is it possible to write a view with input and with IN clause in where cluase ....For Example I want to create a view like Below ..
    The below query may be syntactically wrong , but my intension of writing is similary to this. And the query should contain a IN caluse and A union as below...
    create or replace VIEW view_name (col1,col2, P_inputparam VARCHAR2)
    as
    SELECT Col1,Col2
    FROM table_name1
    where any_column11 in (
    &P_inputparam
    UNION
    SELECT Col1,Col2
    FROM table_name2
    where any_column22 in (
    &P_inputparam
              Thanks In advance.
    Not like that... no.
    What you're using as "input" there are SQL*Plus substitution variables. Those values are requested by SQL*Plus before the code is sent to the database and compiled. Code that runs on the database has no way of interacting with a client keyboard or screen, so you cannot get stored code to prompt for user input.
    See: {message:id=10744582}
    It's possible to use SYS_CONTEXT to get a view to pick up a value that has been previously assigned before the view is used, though I rarely find a need to do this myself.

  • Oracle Views with Column type as CLOB

    I have a table which has a column of type CLOB. I am trying to creating a view which has all the columns of that table.
    I get
    Warning: View created with compilation errors.
    SQL> show errors;
    No errors
    Can any one help me how to create a view on a table wihich has a CLOB/BLOB column types. Also how to select the clob data from the view
    sree

    Are you the owner of the view you created?
    Check out the documentation for the SHOW command.
    If you omit schema, SHOW ERRORS assumes the object is located in your current schema.

  • Using EBS Oracle views with Discoverer

    Hi everyone
    Does anyone have experience of working with the standard EBS BI install for R12? If so, I'd like the opportunity to discuss it with you.
    Please email me on [email protected] so I can pick your brains. :-)
    Best wishes
    Michael

    Hi everyone
    Does anyone have experience of working with the standard EBS BI install for R12? If so, I'd like the opportunity to discuss it with you.
    Please email me on [email protected] so I can pick your brains. :-)
    Best wishes
    Michael

  • Sending a parameter to a Oracle view

    I want to create a oracle view with a variable and i want to change the value of variable according to my needs.
    Can i Do This.
    Query of view is a complex one assume as like this
    SELECT ........ FROM
         ( SELECT ........ FROM .............
             WHERE  tempDate=TO_DATE('2007/2/23', 'YYYY/MM/DD')
      WHERE ...............................Date should be a variable.
    Variable should in a sub query.
    Pls Help as soon as possible

    Try using a PreparedStatement and insert a parameter placeholder ("?") instead of "TO_DATE('2007/2/23', 'YYYY/MM/DD')".
    Pls Help as soon as possibleUsually I don't, good you told me ...

  • Trying to replicate google street view?

    hi all,
    im a student at MMU currently on a Foundation Degree course.
    i am wondering if there is a way to replicate google street view with our own images in a project we are doing based around the MMU itself?
    thanks for your time in replying, i am personally using CS5 and the college uses CS4 (CS5 is back compatible with CS4 anyways)
    thanks,
    Will

    Yes. You can use Google Map API for custom Street View.
    http://code.google.com/apis/maps/documentation/javascript/services.html#CustomStreetView
    By the way this is not Flash but JavaScript - Google has officially terminated the API for Flash
    Kenneth Kawamoto
    http://www.materiaprima.co.uk/

  • Oracle doc inconsistent on materialize view with union all and self joins

    First of all, I can't seem to create a materialized view containing self-joins AND union all. Is it possible?
    I checked Oracle 9i (my version: PL/SQL Release 9.2.0.4.0 - Production) documentation and I get different answers (or so it seems to me).
    First I saw this: "The COMPATIBILITY parameter must be set to 9.0 if the materialized aggregate view has inline views, outer joins, self joins or grouping sets and FAST REFRESH is specified during creation..."
    Did you see the part about 'self joins' in there? I did and I was pumped because that seems to say that you CAN have 'self joins' (and my compatibility is 9.2...)
    BUT
    In the very same document I also found "Oracle does not allow self-joins in materialized join views." (rage)
    You can see the document I am speaking of here: http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96520/mv.htm#574889
    Whenever I try to create the mview I get the following error. (
    In any caseORA-01446 cannot select ROWID from view with DISTINCT, GROUP BY, etc.

    First of all, I can't seem to create a materialized view containing self-joins AND union all. Is it possible?
    I checked Oracle 9i (my version: PL/SQL Release 9.2.0.4.0 - Production) documentation and I get different answers (or so it seems to me).
    First I saw this: "The COMPATIBILITY parameter must be set to 9.0 if the materialized aggregate view has inline views, outer joins, self joins or grouping sets and FAST REFRESH is specified during creation..."
    Did you see the part about 'self joins' in there? I did and I was pumped because that seems to say that you CAN have 'self joins' (and my compatibility is 9.2...)
    BUT
    In the very same document I also found "Oracle does not allow self-joins in materialized join views." (rage)
    You can see the document I am speaking of here: http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96520/mv.htm#574889
    Whenever I try to create the mview I get the following error. (
    In any caseORA-01446 cannot select ROWID from view with DISTINCT, GROUP BY, etc.

  • Issue in Invoking an Updatable View with Instead of Trigger

    Hi,
    I am trying to insert a record using Updatable View with Instead of Trigger. When i try to save the data, i get the below error:
    java.sql.SQLException: ORA-01403: no data found
    ORA-06512: at line 1
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
    at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:213)
    at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1075)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1466)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3752)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3887)
    at oracle.jdbc.driver.OracleCallableStatement.executeUpdate(OracleCallableStatement.java:9323)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1508)
    at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:172)
    at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:432)
    at oracle.jbo.server.EntityImpl.doDMLWithLOBs(EntityImpl.java:8566)
    Can someone help me resolve this issue?
    Also it would be great if you can share Sample codes for Invoking an updatable view with instead of trigger on Save/commit.
    Regards,
    Jeevan

    As a trigger is executed in the db and not in your app it's really hard to help as you did not give any useful information.
    Have you read this blog http://stegemanoracle.blogspot.com/2006/03/using-updatable-views-with-adf.html ?
    Timo
    Edited by: Timo Hahn on 22.09.2011 09:15
    And my friend google also found http://technology.amis.nl/blog/1447/adf-business-components-resfresh-after-insertupdate-and-instead-of-triggers

  • Insert order by records into a view with a instead of trigger

    Hi all,
    I have this DML query:
    INSERT INTO table_view t (a,
                              b,
                              c,
                              d,
                              e)
          SELECT   a,
                   b,
                   c,
                   d,
                   e
            FROM   table_name
        ORDER BY   dtable_view is a view with an INSTEAD OF trigger and table_name is a table with my records to be inserted.
    I need the ORDER BY clause because in my trigger i call a procedure who treat each record and insert into a table, used in the view. I need to garantee these order.
    If i put an other SELECT statement outside, like this:
    INSERT INTO table_view t (a,
                              b,
                              c,
                              d,
                              e)
          SELECT   a,
                   b,
                   c,
                   d,
                   e
            FROM   table_name
        ORDER BY   dIt works. But I can put these new SELECT because these query is created automatic by Oracle Data Integrator.
    What I'm asking you is if there any solution to this problem without changing anything in the Oracle Data Integrator. Or, in other words, if there is any simple solution other than to add a new SELECT statement.
    Thanks in advance,
    Regards.

    Sorry... copy+paste error :)
    INSERT INTO table_view t (a,
                              b,
                              c,
                              d,
                              e)
        SELECT   *
          FROM   (  SELECT   a,
                             b,
                             c,
                             d,
                             e
                      FROM   table_name
                  ORDER BY   d)I need to insert him by a D column order, because my trigger needs to validate each record and insert him. I have some restrictions. For example, my records are:
    2     1     2006     M
    1     2     2007 M
    1     3     2007     S 2007
    1     2     2007     S 2007
    2     1     2009     S
    2     1     2009     S
    I want to insert the 'M' records first and then the 'S' records because the 'S' records only makes sense in target table is exists 'M' records
    Regards,
    Filipe Almeida

  • How to create a view with parameter?

    who can tell me hwo to create a view with
    parameters just like a cursor?

    Hi,
    This is not possible in Oracle. What u can do is create the view without the where clasue and supply the where clause at runtime.
    Hope this helps...
    Regards,
    Ganesh R

  • ORA-02070: Error when updating a SQL Server table thru an Oracle View

    I have a SQL Server table TIMESHEET which contains a number of VARCHAR and NUMERIC columns plus a DATETIME column.
    Only the DATETIME column is giving me trouble.
    On the ORACLE side I have a view which selects from the SQL Server table but in order to get the SELECT to work, I had to either put a CAST or TO_DATE function call around the DATETIME field
    Below is the relevant part of the 2 view definitions I have tried
    create view TIMESHEET as
    SELECT
    "TsKeySeq" as TS_KEY_SEQ,
    "EmployeeNo" as EMPLOYEE_NO,
    CAST("PeriodEnding" AS DATE) as PERIOD_ENDING,
    . . . (more columns - not relevant)
    FROM [email protected];
    An update to the view generates this message
    ORA-02070: database OLEMSQLPSANTDAS6 does not support CAST in this context
    create view TIMESHEET as
    SELECT
    "TsKeySeq" as TS_KEY_SEQ,
    "EmployeeNo" as EMPLOYEE_NO,
    TO_DATE("PeriodEnding") as PERIOD_ENDING,
    . . . (more columns - not relevant)
    FROM [email protected];
    An update to the view generates this message
    ORA-02070: database OLEMSQLPSANTDAS6 does not support TO_DATE in this context
    If I don't include either the TO_DATE() or CAST() then I get
    Select Error: ORA-28527: Heterogeneous Services datatype mapping error
    ORA-02063:preceding line from OLEMSQLSANTDAS6
    Does anyone have any idea how to update a SQL Server DATETIME column thru an ORACLE view?

    You can't cast accross heterogenious databases and there is no need to. HSODBC treats SQL Server DATETIME column as DATE. For example, I have SQL Server table:
    CREATE TABLE [Ops].[T_JobType](
         [JobType] [varchar](50) NOT NULL,
         [JobDesc] [varchar](200) NULL,
         [InsertDt] [datetime] NOT NULL CONSTRAINT [InsertDt_00000006]  DEFAULT (getdate()),
         [InsertBy] [varchar](128) NOT NULL CONSTRAINT [InsertBy_00000006]  DEFAULT (user_name()),
         [LastUpdated] [datetime] NOT NULL CONSTRAINT [LastUpdated_00000006]  DEFAULT (getdate()),
         [LastUpdatedBy] [varchar](128) NOT NULL CONSTRAINT [LastUpdatedBy_00000006]  DEFAULT (user_name()),
    CONSTRAINT [T_JobType_PK] PRIMARY KEY CLUSTERED
         [JobType] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 100) ON [DATA01FG]
    ) ON [DATA01FG]Now on Oracle side I do:
    SQL> desc "Ops"."T_JobType"@pbods
    Name                                      Null?    Type
    JobType                                   NOT NULL VARCHAR2(50)
    JobDesc                                            VARCHAR2(200)
    InsertDt                                  NOT NULL DATE
    InsertBy                                  NOT NULL VARCHAR2(128)
    LastUpdated                               NOT NULL DATE
    LastUpdatedBy                             NOT NULL VARCHAR2(128)
    SQL> select "InsertDt" from "Ops"."T_JobType"@pbods;
    InsertDt
    18-AUG-08
    09-OCT-08
    22-OCT-09
    18-AUG-08
    19-NOV-08
    SQL> SY.

  • Creation of materialized view with view log file for fast refresh in 10.1db

    Hi,.. I have a select statements that includes data from almost 20 tables and takes long time to complete..I am planing to create a materialized view on this.. would you please suggest best way of doing this?
    we would like to have materialized view and materialized log file to refresh changes from underline table to mv view. please provide help on this .. thanks in advance

    It will be possible to create a Materialised view with up to 20 tables, but you have to understand the restrictions on complex Materialised views with regards to fast refresh.
    To help your understanding, refer to Materialized View Concepts and Architecture
    <br>
    Oracle Database FAQs
    </br>

  • ADF BC: Creating updatable VO based upon DB View with "instead of" trigger

    Hello all,
    I have got an interesting issue. I have an Oracle DB view that is used to hide some complexity in the underlying DB design (it does some unions). This view is updatable because we have created an "instead of" update trigger to update the correct table when a row is updated. This is working fine in SQL.
    Next, we have created an ADF Entity object based upon the view, specifying an appropriate PK for the DB View. Then, we have created an updatable VO based upon the EO. All well and good so far. The issue we have is in trying to commit changes to the DB - because the ADF BC framework is trying to lock the row to update (using SELECT ... FOR UPDATE), it's not working because of ORA-02014 - cannot select FOR UPDATE from view with DISTINCT, GROUP BY, etc.
    This leads me to thinking about overridding doSelect() on the EO as hinted here http://radio.weblogs.com/0118231/stories/2005/07/28/differenceBetweenViewObjectSelectAndEntityDoselectMethod.html
    As a temporary test, we have over-ridden the EO's doSelect to call super.doSelect(false) and it does work, although we will have lost update issues as detailed in Steve's article.
    My questions:
    1). Is overriding doSelect() the correct thing here? Perhaps there is a better way of handling this problem? I do have a base EO class from which all of the EO's extend, so adding this behavior should be straightforward.
    2). Does anyone have example doSelect implementation? I am thinking of overriding doSelect for my EO and calling super.doSelect (lock=false), but then I need to deal with some possible exceptions, no?
    Kind regards,
    John

    Hi John,
    I have exactly the same issue as you experienced back in January. I have a complex data modelling requirement which requires the need to pivot rows into columns using ROW_NUMBER() and PARTITION clauses. To hide the complexity from the middle tier, I have created a database view and appropriate INSTEAD OF triggers and mapped my EO to the view. I have overriden the lock() method on the EO implementation class (to avoid ORA-02014) and would like to try the same solution you used with the pl/sql call to lock the record.
    My question is, how did you manage the release of the lock if the transaction was not rolled back or committed by your application i.e. if the user closed the browser for instance.
    In my naivity, I would like to think that the BC4J framework would release any locks for the database session when it found the servlet session to be terminated however my concern is that the lock would persist and cause complications.
    Any assistance greatly appreciated (if you would be willing to supply your lock() method and pl/sql procedure logic I would be even more grateful!).
    Many thanks,
    Dave
    London

  • What is the use for CREATING VIEW WITH CHECK OPTION?

    Dear Legends,
    I have a doubt
    What is the use for creating view?
    A: First Data Integrity, Selecting Particular Columns..
    What is the use for creating a view with check option?
    A: As per oracle manual I read that its a referential integrity check through views.
    A: Enforcing constraints at DB level.
    A: using CHECK OPTION we can do INSERTS UPDATES for a view for those columns who have no constraints... is it right??
    A: If we do a INSERT OR UPDATE for columns who have constraints it will show error... is it right???
    Please clear my doubt's Legends
    Lots of Thanks....
    Regards,
    Karthik

    Hi, Karthick,
    karthiksingh_dba wrote:
    ... What is the use for creating view?
    A: First Data Integrity, Selecting Particular Columns..Most views are created and used for convenience. A view is a saved query. If the same operations are often done, then it can be very convenient to code those operations once, in a view, and refer to the view rather than explicitly doing those operations.
    Sometimes, views are created and used for security reasons. For example, you many want to allow some users to see only certain rows or certain columns of a table.
    Views are necessary for INSTEAD OF triggers.
    What is the use for creating a view with check option?
    A: As per oracle manual I read that its a referential integrity check through views.The reason is integrity, not necessarily referential integrity. The CHECK option applies only when DML is done through the view. It prohibits certain changes. For example, if a user can't see certain rows through a view, the CHECK option keeps the user from creating such rows.
    A: Enforcing constraints at DB level.I'm not sure what you mean. Please give an example.
    A: using CHECK OPTION we can do INSERTS UPDATES for a view for those columns who have no constraints... is it right??No. Using CHECK OPTION, you can do some inserts and updates, but not others. The columns involved may or may not have constraints in either case.
    A: If we do a INSERT OR UPDATE for columns who have constraints it will show error... is it right???If you try to violate a constraint, you'll get an error. That happens in views with or without the CHECK OPTION, and also in tables.

  • Can't open a object view with mapinfo

    i have created this object view (with toad 7.6 in a server oracle 9i ITA, i use mapinfo 7.5 ITA):
    CREATE OR REPLACE FORCE VIEW PRG.VISTAMORD
    (PIANO_STORIA_ID, ANAGR_ID, PIANO_ID, TIPOMOD_COD, ZTO,
    PRG, PIANO_STATO, ATTO_DATA, ATTO_TIPO, ATTO_NUM,
    PIANO_VARIANTE, PIANO_NOME, PIANO_NOTE, PIANO_POS_ARCH, PIANO_LEGGE,
    ANAGR_COD_COM, MI_STYLE, MI_PRINX, GEOLOC, ST)
    AS
    SELECT a.Piano_storia_id, a.Anagr_id, a.Piano_id, a.tipomod_cod,
    a.ZTO, a.PRG, b.piano_stato, b.atto_data, b.atto_tipo, b.atto_num,
         b.piano_variante, b.piano_nome, b.piano_note,
         b.piano_pos_arch, b.piano_legge, c.anagr_cod_com,
         d.mi_style, d.mi_prinx, d.geoloc, d.st
    from (piano b inner join ((oggetti_storia a
    inner join aux_indice e on (a.piano_storia_id=e.piano_storia_id)
              and (a.anagr_id=e.anagr_id) and
    (a.piano_id=e.piano_id)) inner join anagrafica c on a.anagr_id = c.anagr_id)
         on b.piano_id = a.piano_storia_id) inner join oggetti_spazial d
              on a.anagr_id = d.anagr_id
    where ((a.tipomod_cod)<>'DEL')
    order by piano_storia_id;
    where oggetti_spazial is a object table (a mapinfo map imported in Oracle)
    if i don't add the order by clause the view is ok and i can open it in mapinfo,
    with the order by clause, when i try to open the view mapinfo give the error:
    "errore Oracle: ORA-00600: codice errore INT., argom.:[15819],[5582],[],[],[],[],[],[]. Impossibile recuperare i record nella tavola.
    can You Help me?

    Hi Gabriel,
    I think with enough patience one could get the ASCII DataPlugin Wizard to create a DataPlugin that would work for your file, but the resulting code generated by the wizard is not easily understandable, and it would not have correctly devined the sampling rate from your file format.  I've written a DataPlugin from scratch which correctly reads the data snippet you sent over.  I included an implicit time channel so that you could easily see the time values inferred from the "SampleRate" line.  The implicit time channel rerquires all the lines in the ASCII file to be parsed in order to figure out the correct channel length (line 58), so if you have large data files you should comment out the time channel lines (44, 45, 58) and use just the implict time information already encoded in the data channel waveform properties (for faster file indexing).  Unless your files are verry large, though, I think you'll like the DataPlugin as it is.
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments
    Attachments:
    Fischerg_TXT.zip ‏2 KB

Maybe you are looking for

  • The ipad could not be synced because this computer is no longer authorized for purchased items

    I autorized the computer but still without sync. Any one can help me?

  • SAP BO Dashboards 4.1 best practice on layout and components

    Dear SCN, I have requirement to create a BO 4.1 dashboard with data & Visualization based on a excel sheet which is currently in use as a Mgmt dashboard. The current excel dashboard is having more than 100 KPIs in one view which is readable only if y

  • Adobe acrobat X1 pro will not install

    I have spent all day trying to install Adobe Acrobat X1 Pro, but it shows an error message at the end.  Your support staff unable to cure problem at moment.

  • Java Programming Questions

    I have taken a couple class in Java programming in just regular programming with GUI/console. I am looking to further my programming skills and wonder what course I need to take to become a java programmer for companies. I am confused on all this lan

  • Why ORA-06519 ?

    I have shown my proc at high level below. While executing this proc for some reason i get Primary key violation on table my_tab_mf during insert, so the procedure as expected jumps to EXCEPTION block. When it comes to proc My_PKG_MF.LOG_ERROR in the