Create virtual table.

Hi all,
I have a table with SUBTYPE, DATAID, ORIGNALDATAID, DATE column.
select dataid, orignaldataid from table where subtype=1 and Date=01-Aug-2010.
I have the above query statment. I need the dataid for further processing, but before the processing is done. I need to check if the orignaldataid=0, if yes, dataid remains else dataid=orginaldataid. Before the list is pass to another sql. But i intend to use nested sql for futher processing, hence i need to database to crunch the data instead of using java to change the data.
I was thinking of creaating another virtaual table in DB where it will automatically do this for me instead of having dataid and orginaldatid column, it will jus have dataid column. Then i can just query this virtual table.
Select dataid from virtualTable where subtype=1 and Date=01-Aug-2010. Is it possible?

Hi,
If you want to have two tables
(1) your original table with all the data, and
(2) fubar, which perhaps has fewer rows, and some derived columns
and you want changes in the original table to automatically change fubar (when apppropriate), then make fubar a Materialized View . Despite the name, a materialized view is a real table. Is it auotmatically refreshed, or changed to show changes in the original table. Typically, this is done at fixed intervals, that is, you tell the system to refresh the materialized view every morning a 2:00 am, or every 30 minutes. You can also refresh it on demand, so that you know the dta is up to date.
If you are using Oracle 10, then you can't use the virtual column feature, but you can create regular columns and write triggers to populate them, based on other values in the same row. I don';t know if this would serve your needs better than a materialized view or not.

Similar Messages

  • Error in Creating virtual tables

    Hi
    I get back a SQL error (SQL Statement not properly ended) in the case of Oracle for the following query. Is it not possible to create virtual tables in Oracle. I work on Oracle 9i
    CREATE GLOBAL TEMPORARY TABLE derTbl2143679361 (DerCol0, DerCol1, DerCol2, MemberCol0, OrdCol1) ON COMMIT PRESERVE ROWS AS
    SELECT TBC.SUPPLIER.COUNTYID, 'AMOUNT', SUM(AMOUNT)
    , TBC.SUPPLIER.COUNTRY
    , TBC.SUPPLIER.COUNTYID
    FROM (TBC.SUPPLIER join TBC.SALES on (TBC.SALES.SUPPLIERID = TBC.SUPPLIER.SUPPLIERID))
    GROUP BY TBC.SUPPLIER.COUNTYID,TBC.SUPPLIER.COUNTRY
    /*The above query works fine*/
    SELECT NETEMP5.Member0, 'AMOUNT', derTbl214367936.DerCol2
    , NETEMP5.Ord1
    FROM (SELECT DISTINCT COALESCE(derTbl2143679361.DerCol0, -2147483647), COALESCE(derTbl2143679361.MemberCol0, '$U$6$N$9$'), COALESCE(derTbl2143679361.OrdCol1, -2147483647) FROM derTbl2143679361) NETEMP5(KeyCol0,Member0,Ord1)
    left outer join derTbl2143679361 on ((COALESCE(NETEMP5.KeyCol0, -2147483647) = COALESCE(derTbl2143679361.DerCol0, -2147483647)))
    GROUP BY NETEMP5.Member0,derTbl2143679361.DerCol2, NETEMP5.Ord1
    ORDER BY 4
    /*This query throws the error*/
    Can I not assign Aliases to the virtual table in this form - NETEMP5(KeyCol0,Member0,Ord1)??
    Thanks

    Hi,
    This is the error that I get back
    ORA-00933- SQL command not properly ended
    It seems that the problem is with the way I use the Alias. The following query works fine
    SELECT NETEMP5.Member0, 'AMOUNT', derTbl214367936.DerCol2
    , NETEMP5.Ord1
    FROM (SELECT DISTINCT COALESCE(derTbl2143679361.DerCol0, -2147483647) KeyCol0, COALESCE(derTbl2143679361.MemberCol0, '$U$6$N$9$') Member0, COALESCE(derTbl2143679361.OrdCol1, -2147483647) Ord1 FROM derTbl2143679361) NETEMP5
    left outer join derTbl2143679361 on ((COALESCE(NETEMP5.KeyCol0, -2147483647) = COALESCE(derTbl2143679361.DerCol0, -2147483647)))
    GROUP BY NETEMP5.Member0,derTbl2143679361.DerCol2, NETEMP5.Ord1
    ORDER BY 4
    Here i use the alias following the column name itself. But is it not possible to have the aliases with the virtual table name (i.e NETEMP5(KeyCol0,Member0,Ord1) ) this works fine on MSSQL & db2
    Thanks

  • Error while creating virtual table in Hana

    Hi Folks,
    Good Day!
    I am trying to create the virtual table in Hana system from Hadoop data base but am getting some privilege issue.
    Please help me to resolve the issue.
    Error Screen shot:
    Thanks,
    Hari

    Hi Hari,
    Check if you have the following privileges assigned to your user ID in Object privileges for the created Remote DNS
    Regards,
    Nehal

  • Error Message: "Excel cannot complete this task with available resources" when creating pivot table with Excel 2013

    Hi, 
    One of our users encountered this problem with Excel 2013 while creating pivot tables, particularly with large files. We tried to modify Virtual Memory
    of the pc but error still persist. Why does this happen and how can we resolve this? Thanks.
    Another error message encountered by the user, this time when opening large files. The files she tried to open are working fine in 2010. But when opened in 2013, it prompted : "There
    isn't enough memory to complete this action. Try using less data or closing other applications."

    Hi,
    In regarding of the issue, please provide us more information to assist you better.
    Did your user using the Excel 2013 and Excel 2010 with same PC? If not, please let me know the both of the 2 PCs' hardware list/Windows operation system info.
    Did you using Excel 2013 32bit version and Excel 2010 64bit version?
    General speaking, this issue usually occurs with Office 2013 32 bit version. It has a limitation of 2Gb of memory that can be used by its process. And the 64-bit Excel can handle larger workbooks.
    Thus, if your user using 32bit Excel, I recommend try 64bit Excel instead.
    Here is a similar issue, we also could try it:
    http://answers.microsoft.com/en-us/office/forum/office_2007-excel/excel-cannot-complete-the-task-with-available/d31b1822-ebde-4c9b-8d11-e54bb652847d
    If you have any update, please feel free let us know.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Are Selects from ( two or more ) Virtual Tables Possible?

    Hello.
    This is what I mean by a virtual table - and this works in OBIEE -
    select
        saw_0, saw_2, saw_3
    from
         SELECT
            "- Nx_CSDG0_Repair_Orders (Depot Repair Views)".Repair_Number saw_0,
            "- Nx_CSDG0_Repair_Orders (Depot Repair Views)".Repair_Order_Creation_Date saw_2,
            "- Nx_CSDG0_Repair_Orders (Depot Repair Views)".Repair_Order_Closed_Date saw_3
         FROM
            "[Noetix-NoetixGlobalRepository] NoetixViews for Oracle Service"
         WHERE
           "- Nx_CSDG0_Repair_Orders (Depot Repair Views)".Repair_Number BETWEEN '100000' AND '100009'
    ) t1However, this does not work -
    [ Note that each of the nested queries works ok on its own. ]
    select
        saw_0, saw_2, saw_3, saw_4
    from
         (SELECT
            "- Nx_CSDG0_Repair_Orders (Depot Repair Views)".Repair_Number saw_0,
            "- Nx_CSDG0_Repair_Orders (Depot Repair Views)".Repair_Order_Creation_Date saw_2,
            "- Nx_CSDG0_Repair_Orders (Depot Repair Views)".Repair_Order_Closed_Date saw_3
         FROM
            "[Noetix-NoetixGlobalRepository] NoetixViews for Oracle Service"
         WHERE
            "- Nx_CSDG0_Repair_Orders (Depot Repair Views)".Repair_Number BETWEEN '100000' AND '100009' ) t1,
         (SELECT
            TOPN("- Nx_CSDG0_Repair_Orders (Depot Repair Views)".Repair_Number, 3) saw_4, 
         FROM
           "[Noetix-NoetixGlobalRepository] NoetixViews for Oracle Service"
         WHERE
           "- Nx_CSDG0_Repair_Orders (Depot Repair Views)".Repair_Number BETWEEN '100000' AND '100009' ) t2
    ) t3My question is this - is there a syntactic variation on this that does work? Or is it impossible?
    Thank you!
    Charlie

    Hello, User.
    I think what I'm trying to achieve is unclear. Consider first this query -
    SELECT
            "- Nx_CSDG0_Repair_Orders (Depot Repair Views)".Repair_Number saw_0,
            "- Nx_CSDG0_Repair_Orders (Depot Repair Views)".Repair_Order_Creation_Date saw_2,
            "- Nx_CSDG0_Repair_Orders (Depot Repair Views)".Repair_Order_Closed_Date saw_3
         FROM
            "[Noetix-NoetixGlobalRepository] NoetixViews for Oracle Service"
         WHERE
            "- Nx_CSDG0_Repair_Orders (Depot Repair Views)".Repair_Number BETWEEN '100000' AND '100009'Let's call that the "business result".
    What I'm trying to do is get a result set that has 3 rows for every row in the "business result" set. I'm trying to get this by coercing OBIEE to join the business result to an arbitrary 3-row set whose only purpose is to create that cartesian product result.
    So I create a second SQL expression -
    SELECT
            TOPN("- Nx_CSDG0_Repair_Orders (Depot Repair Views)".Repair_Number, 3) saw_4, 
         FROM
           "[Noetix-NoetixGlobalRepository] NoetixViews for Oracle Service"
         WHERE
           "- Nx_CSDG0_Repair_Orders (Depot Repair Views)".Repair_Number BETWEEN '100000' AND '100009'- which returns 3 rows of anything.
    I want to turn this -
    1   ABC   20.95
    2   DEF   19.95
    3   XYZ   24.95Into this -
    A  1   ABC   20.95
    B  1   ABC   20.95
    C  1   ABC   20.95
    A  2   DEF   19.95
    B  2   DEF   19.95
    C  2   DEF   19.95
    A  3   XYZ   24.95
    B  3   XYZ   24.95
    C  3   XYZ   24.95My attempt to force a join fails - and I'm asking if there is a syntax tweak (or another approach entirely) that will do the trick.
    Thank you.
    Charlie

  • Virtual Tables in a universe?

    We have a large structured database that we would like to make available through a universe.  We were considering using a universe that references tables that we make up so that when the report occurs, BO would request the data based on "virtual" tables and we would do the conversion to create efficient queries so that only the tables required to fullfill the data request would be used.  We believe this will be a lot more efficient over the alternative of creating real views that join a lot of tables together to answer the data request.
    I would like to know how we can create the universe using the designer sdk.  I assume that I will need to create new a class that implements the Table interface.  This seems like a lot of work.  Are there any short cuts I could take to create tables in a universe that are not directly linked to real tables in a database?
    Most of the implementation looks straight forward, but some methods that create a "Class" or "Delete" require a knowledge of the API.  I'm not quite sure how to implement these methods.

    Hi Trey,
    If your question is more related to the SDK, then I suggest yo post this to one of the SDK forums. You would get a better response there as within this forum threads are related to universe builders who use the Designer tool to construct universes.
    Regards
    Jacques

  • What does DAQmx Create Virtual Channel (TEDS AI Accelerometer) actually do?

    Hi all,
    I have a basic vibration logging application for which I'm using TEDS enabled accelerometers.  I'm configuring a task using the Create Virtual Channel (TEDS AI Accelerometer) to add the correct channels, but none of the data from the TEDS table appears to be getting pulled into my channels. 
    Does this VI pull scaling information from the TEDS such that the values I read out are scaled to the appropriate unit?  Is there a way to force it to drag all the data from the TEDS through so that when I save a waveform to a tdms file they end up as channel properties?
    I've included a screenshot of the VI that creates the task for reference.  Thanks!
    CLAD
    Solved!
    Go to Solution.
    Attachments:
    Create TEDS channel.jpg ‏100 KB

    They are TEDS 1 accelerometers.  I can actually see the entire TEDS table both in MAX and in my code (I read out the bitstream for my own amusement). 
    To collect the data I'm using a DAQmx Read N Chan N Samp - 1D Waveform.  The output waveform array is wired directly to a TDMS write VI.  The properties on the channel end up as shown in the attached image; note that no scaling information is carried thorugh.
    CLAD
    Attachments:
    AccChannel Properties.png ‏37 KB

  • Populating a Crystal Report from a virtual table

    Hi,
    Iu2019m using Crystal Report XI R2. I have a Crystal Report which is created using a view in Oracle using the native oracle DB connection. Iu2019m intending to write an application which should populate this report with data using a virtual table in memory. Populating the virtual table could be done by me but what I need to know is how to populate the report using this virtual table. Note the virtual table name will be the same as the one that was used to design the report. Is such a thing possible in the Crystal Java SDK. I found the flowing link http://www.eggheadcafe.com/forumarchives/NETgeneral/Jul2005/post23273440.asp and it talks about a PUSH feature. Can this be used? If so can you tell me how, maybe a small sample code would help.
    Thanks you in advance,
    Regards,
    Chanaka

    I would suggest searching for how to use resultsets with crystal reports.

  • Create partition table upto level 3

    Hi All,
    I want to create partition table using 3 columns. could you please tell me is that possible to do in oracle 11G. if can please tell me the way to create
    PARTITION BY LIST (Acct_type)
    SUBPARTITION BY LIST (PERIOD)
    and needs to partition this using another column.( account_source)
    please help me.
    Regards,
    krish

    Hello,
    3 levels of partition are not possible.
    But perhaps you can combine 2 levels as follows:
    With Oracle 11g you can use a virtual column:
    CREATE TABLE F_ACCOUNT_PART
    acc_type varchar2(100),
    acc_source varchar2(100),
    period date,
    acc_type_source varchar2(201) as (acc_type||'_'||acc_source) )
    PARTITION BY LIST (acc_type_source)
    PARTITION FA_AA_ACC1 VALUES ('AA-ACC1') TABLESPACE USERS,
    PARTITION FA_BB_ACC1 VALUES ('BB-ACC1') TABLESPACE USERS,
    PARTITION FA_CC_ACC1 VALUES ('CC-ACC1') TABLESPACE USERS,
    PARTITION FA_DD_ACC1 VALUES ('DD-ACC1') TABLESPACE USERS,
    PARTITION FA_AA_ACC2 VALUES ('AA-ACC2') TABLESPACE USERS,
    PARTITION FA_BB_ACC2 VALUES ('BB-ACC2') TABLESPACE USERS,
    PARTITION FA_CC_ACC2 VALUES ('CC-ACC2') TABLESPACE USERS,
    PARTITION FA_DD_ACC2 VALUES ('DD-ACC2') TABLESPACE USERS,
    PARTITION all_other VALUES (DEFAULT) TABLESPACE USERS
    )For versions prior to 11g you have to build a new column acc_type_source and fill the values cancatenated.
    Maik

  • CREATING VIRTUAL COLUMN IN OWB11g

    How can i create virtual columns in ORACLE 11g using Warehouse Builder. OWB11g does not seem to have this option available. The only other option seems to be to alter the table using sql.

    Thanks, I know how is it done. using the data object editor. I can't see anywhere in the data object editor where the virtual column creation could go. I have tried using the default value and this is the query it generates below.
    CREATE TABLE "TABLE_1"
    "TEST" VARCHAR2(7),
    "TEST2" VARCHAR2(7) default GENERATED ALWAYS AS (1)
    this is the error I receive
    Error
    ORA-00984: column not allowed here
    obviously the default is the problem. Is there anyway i could do this using the data object editor

  • Virtual Tables

    Hello,
    For example, I have two tables:
    table1
    t1_id
    t1_data
    table2
    t2_id
    t1_id (reference to filed table1.t1_id)
    t2_data
    I want to create two virtual tables: vtable1 and vtable2.
    Real data must be stored only in tables table1 and table2. vtable1 and vtable2 must be only aliases (links, pointers etc), with new table name and new field names.
    When I insert, select, update or delete data from vtable1 or vtable2, data modification must be made with original tables and vice versa.
    Has oracle some nice methods to create such virtual tables?

    Simple..
    schema1.table1
    schema1.table2
    create..
    schema2.view1
    schema2.view2
    where view1 is something like select col1 as aliascol1, col2 as aliascol2 from schema1.table1..
    To do this you should grant at least the select to schema2 user on schema1 objects.
    Read the docs how to do that..
    Acr

  • Problem with creating virtual column

    Hello,
    We've got problem with creating virtual column.
    There is table R_T that contain columns R_ID and L_ID, we would like to create virtual column RL_ID that contains sth like 'R_ID-L_ID' (R_ID, L_ID and RL_ID are varchars).
    According documentation we've tried:
    alter table R_T add column (RL_ID varchar2(60) generated always as (R_ID||'-'||L_ID) VIRTUAL)
    but getting
    ORA-00904: : invalid identifier
    00904.00000 - "%s: invalid identifier"
    Have no idea where is the problem.
    Table, columns names are little different but contains only capital letters A - Z and underscore "_".
    Has anyone idea?
    Thanks a lot.

    Strange...
    This does work for me :
    Connected to Oracle Database 11g Enterprise Edition Release 11.2.0.1.0
    Connected as dev
    SQL>
    SQL> create table r_t (
      2   r_id varchar2(25),
      3   l_id varchar2(25)
      4  );
    Table created
    SQL> insert into r_t (r_id, l_id) values('R','L');
    1 row inserted
    SQL> alter table r_t add (rl_id varchar2(60) generated always as (r_id||'-'||l_id) virtual);
    Table altered
    SQL> select * from r_t;
    R_ID                      L_ID                      RL_ID
    R                         L                         R-L
    SQL>

  • Need to create a table

    hi
    i need to create a table emp( eno, ename, salary, address, doj, dob(dd-mm-yyyy), phone, city)
    which datatype suits for the dob column. as we need to enter in the format as 'dd-mm-yyyy'.
    please help.

    Hi,
    1009262 wrote:
    hi
    i need to create a table emp( eno, ename, salary, address, doj, dob(dd-mm-yyyy), phone, city)
    which datatype suits for the dob column. as we need to enter in the format as 'dd-mm-yyyy'.The DATE datatype is best for anything that indicates a point in time. Which format you want has nothing to do with the data type; DATEs can be entered or displayed in virtually any format you wish. I've said it, and the 2 earlier replies said it, but this is important enough to repeat: Always use the DATE datatype for information about dates.
    The only exception is when fractions of a second are significant, or when you need to capture time zone information along with the date. In that case, use the TIMESTAMP data type, but DATEs are a lot easier to use, and there are many more useful built-in functions for manipulating DATEs, so use DATEs whenever possible. For date-of-birth, you probably don't want to record hours, minutes or seconds, let alone fractions of a second, so there's no reason to use a TIMESTAMP, and there is never any reason to use any other datatype, such as VARCHAR2 or NUMBER.

  • How Create Virtual Directory On Oracle Application Server 10g on RHEL 5

    Dear Sir
    i have deployed my application on OAS 10g on RHEL 5 ,,now since my application is calling some pro*c programs and then they generate some text based reports on fixed folder named
    /treas/temp
    now i simply have to open these text based reports on web browser
    WEB.SHOW_DOCUMENT('/forms/pcreport/'||v_filename);
    but for that i need to create virtual directory name : " /pcreport " without code
    kindlly help as its working on my developer suit 10g i created a virtual directory in my application server by making following entry in "orion-web.xml" file
    <virtual-directory virtual-path="/pcreport" real-path="/u/treas/temp" />
    kindlly help

    (My paths shown, yours will be different)
    In a text editor :
    /u01/app/oracle/product/midtier/Apache/Apache/conf/httpd.conf
    Add
    Alias /pcreport/ "/u01/app/oracle/product/midtier/forms/pcreport/"
    <Directory "/u01/app/oracle/product/midtier/forms/pcreport/">
    Options Indexes
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>
    Create the pcreport directory.
    Add a simple test page
    vi /u01/app/oracle/product/midtier/forms/pcreport/test.html
    <html>
    <head>
    <title>Simple test page </title>
    <style type="text/css">
    body {
    margin-left: 20%;;
    margin-right: 20%;
    border: 1px dotted gray;
    padding: 10px 10px 10px 10px;
    </style>
    </head>
    <body>
    <p>test!</p>
    </body>
    </html>
    Test
    http://yourserver.com:7777/pcreport/test.html
    Best Regards
    mseberg

  • Error while creating temporary table

    Hi All,
    I am trying to integrate ODI and BAM . I have followed all the steps given in the guide.While creating interface i am getting the error while LKM is working.
    I am using LKM SQL to SQL and IKM Oracle BAM Insert ( as the inserted data should be captured after inserting).
    http://download.oracle.com/docs/cd/E12839_01/integration.1111/e10224/bam_odi.htm
    Please use this link for clarification.For me drop work table and create work table failed (C$ -work table). Anyone have any idea about this could you help me?
    Thanks in advance,
    Gnanaprakasam

    It seems the table(MMMORDERFILE_C$_REQUEST ) already exist in the work schema,so cant able to create and throw an error. can you tell me which KM you are using?

Maybe you are looking for

  • Attachments simply quit opening or open incorrectly on my ipad.

    PDF attachments just quit opening correctly.  I generally get the first page in the e-mail body, and no options to download the remaider of the file.  Other times, it downloads, but will not open.  This just started about a week ago.  I use 7.1.1 and

  • Special character issue with Adobe Reader 11.03 Hyperlink path

    Adobe Reader changes a [ character in a hyperlink path to a % sign, thus changing the path and destroying the link,when opened in version 11.03.  This does not happen with 11.01. I have also seen this with Acrobat X, but not sure which update. This i

  • Confused between network password and WEP!

    I wanted to make the wireless network secure in my neighborhood so put a password on my Airport network, but then in the Aiport configuration I chose WEP encryption as well. When guests come to visit they have to apparently know both the password and

  • Error in Percentage function - %GT

    Hi, Im using Percentage function %GT like: %GT 'Key Figure' But when i execute my query i am getting below error: Exception in BI runtime The formula operation %GT is not allowed here (formula 488YAHA2EN2SD4JL3TM9LQDJI) Program error in class SAPMSSY

  • A Global Catalog Server could not be located - All GC's are down server 2003 dc

    Im all out of ideas.  I have two 2003 server DC's that both fail DCDIAG with the following adn my exchange services wont come online due to this. please help! dc1-server dcdiag       Starting test: FsmoCheck          Warning: DcGetDcName(GC_SERVER_RE