Problems when selecting from temp table

I have a php script wich creates a temporary table with this command:
"create global temporary table temp_ouput(...)"
All is ok.
Then I insert a lot of data and it doesn't complain.
Then I attempt to select all records but I end up with an empty set. I mean, it doesn't return any records.
What's wrong here?

Are you using the ON COMMIT PRESERVE ROWS option? If not, your data will be deleted as soon as you commit after your insert.
If you do use this option, you need to clear the table yourself if you are re-using the temp table within your session.

Similar Messages

  • How to avoid ORA-3113 when selecting from XMLTYPE table

    Hi,
    If I register an XML-schema, Oracle automatically creates a table xxxxxx_tab of XMLTYPE. (I use Oracle 9.2.0.1)
    When I do a DESCRIBE or a SELECT from this table I get the error: 'ORA-03113:
    end-of-file on communication channel' and my connection is dropped.
    I opened a TAR for this and Oracle says: 'It is an internal bug so cannot be viewed in metalink. This is fixed in release 10i.' (do they mean oracle DB rel 10i, or a new version of XDK?)
    I saw an example in Oracle Magazine (Jan
    2003) "Make XML Native and Relative" about Oracle 9i Rel 2 and XML. As you can see in codeListing 7, the author also does a select from such a
    table (CD331_tab): Why doesn't he have any problems?
    Is there a workaround for this bug? What's the purpose of being able to automatically upload XML-data to a registered schema if you can't do a select of the data?
    Thank you!

    It appears that the XML Schema is not entirely valid. Specifically, the definition of element "DeviceCategory" has two definitions of element "Audio" appearing within a <choice> model i.e. something like :
    <element name="DeviceCategory">
    <choice>
    <sequence>
    <element name="Audio">
    </sequence>
    <sequence>
    <element name="Audio">
    </sequence>
    </choice>
    This is disallowed by XML Schema spec per. the Unique Particle Attribution Constraint. The general idea is that a XML Schema describes a determinstic content model i.e. schema processor can always unambiguosly determine the matching declaration when it encounters an element. However that's not the case with the declaration above. On encoutering "Audio", it could match either the first or the second declaration of the element. Hence the error.
    You will have to rework the schema to avoid this constraint. One mechanism could be to define complexType and their restrictions.
    - Ravi

  • Selected rows appear in random order when selected from ADF Table

    Hi All,
    I am working in ADF 10.1.3
    I have a ADF Table with a multi select option associated with a DataBean, My requirement is when I select multiple rows from the table and click on some button to goto next page, the selected rows are not getting populated as per the selection order.
    Example: If I select 1st,3rd,5th,7th,9th rows from the ADF Table then in the next page I see the results as 3rd,1st,5th,9th,7th. - Randomly it is getting displayed.
    I am using the following code to get the records from Multi select ADF Table.
    I am adding the selected records to a List.
    selectedRowSet = this.getTable1().getSelectionState().getKeySet();
    rowSetIter = selectedRowSet.iterator();
    if (selectedRowSet.size() > 0)
    Integer index = Integer.parseInt((String) rowSetIter.next());
    Object rowData = this.getTable1().getRowData(index.intValue());
    The order is getting jumbled when I see the final list.
    Pls help me in this.
    Thanks

    Hi Frank,
    Thanks for the update.
    We are using 10.1.3.3 and already our application in QA Testing. User need this to be fixed. Is there any work around for this problem?
    Thanks
    JP

  • SSMS is not listing table and views objects though the objects are listed when I execute TSql string "SELECT * FROM sys.Tables"

    I have a db, call it xyz.mdb
    It suddenly is that SSMS is not listing the table objects nor the Views.  SELECT * FROM sys.Tables and SELECT * FROM sys.Views work very fine.  But when I click on the tables node, on Objects Explorer, Only the Systems Tables and File Tables folders
    show. 
    Other DBs on same SQL instance do not show same problem.  They are all working very fine.
    I have backed up and restored this db on other computers and the behaviour is the same.  Incidentally right-clicking the db and clicking Properties throws up this error message.
    -------------------------------------------------------------------------Error!
    Cannot show requested dialog.
    Property Size is not available for Database '[Pliny E DB - NOA 2014]'. This property may not exist for this object, or may not be retrievable due to insufficient access rights.  (Microsoft.SqlServer.Smo)
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=11.0.3000.0+((SQL11_PCU_Main).121019-1325+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.PropertyCannotBeRetrievedExceptionText&EvtID=Size&LinkId=20476
    --------------------------------------------------------------------------------End>
    When I try to Refrresh the Tables node on Object Explorer, I get this other:
    ------------------------------Error!
    SQL Server detected a logical consistency-based I/O error: incorrect checksum (expected: 0x9090d9b7; actual: 0x909001b4). It occurred during a read of page (1:1173) in database ID 21 at offset 0x0000000092a000 in file 'c:\Databases\Clients\NOA\Pliny E DB -
    NOA 2014.mdf'.  Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check
    (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online. (Microsoft SQL Server, Error: 824)
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=824&LinkId=20476
    ------------------------------End>
    The Help link of course is not valid any more.
    Many thanks
    Vie
    @Abuja
    Vie

    Your database is corrupted and you need to run.
    DBCC CHECKDB
    You already have a backup so do it...
    This link will provide you with more information:
    http://msdn.microsoft.com/en-us/library/ms176064.aspx

  • Select from nested table in a nested table security problem

    please help
    running Oracle 9.2.0.3.0 on RH AS 2.1
    I can select the inner most nested table as the creator, but can't use the same select statement as USER2.
    ORA-00942: table or view does not exist
    -- begin make of objects and tables
    create or replace type mydata_t as object ( x float, y float);
    create or replace type mydata_tab_t as table of mydata_t;
    create or replace type mid_t as object (
         graphname varchar2(12),
         datapoints mydata_tab_t );
    create or replace type mid_tab_t as table of mid_t;
    create or replace type top_t as object (
         someinfo int,
         more_mid     mid_tab_t );
    create table xyz (
         xyzPK int,
         mainstuff     top_t )
         nested table mainstuff.more_mid store as mid_nt_tab
              (nested table datapoints store as mydata_nt_tab)
    -- grants
    grant all on mydata_t to user2;
    grant all on mydata_tab_t to user2;
    grant all on mid_t to user2;
    grant all on mid_tab_t to user2;
    grant all on top_t to user2;
    grant all on xyz to user2;
    -- insert
    insert into xyz values (1, top_t(22,mid_tab_t(mid_t('line1',mydata_tab_t(
    mydata_t(0,0),
    mydata_t(15,15),
    mydata_t(30,30))))));
    commit;
    -- select fails as user2
    select * from table(select Y.datapoints as DP_TAB
         from table(select X.mainstuff.more_mid as MORE_TAB
              from scott.xyz X
              where X.xyzPK=1) Y
         where Y.graphname='line1') Z;
    -- select works as user2, but i need individual lines
    select Y.datapoints as DP_TAB
         from table(select X.mainstuff.more_mid as MORE_TAB
              from scott.xyz X
              where X.xyzPK=1) Y
         where Y.graphname='line1';

    Thank you for your reply.
    I have tried
    select value(t) from table t;
    but it is still not working. I got almost the same answer as before.
    Anyway thank you very much again.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by MARCELO OCHOA ([email protected]):
    Originally posted by meimei wu ([email protected]):
    [b]I created a nested object-relational table using REF type in oracle8i. when I tried to select * from the table, I got lots of number as the ref type values, but actually, the value in ref type should be of type varchar2 and number. The number I got looked like following code:
    JARTICLE_REF_TYPE(000022020876108427C2FE0D00E0340800208FD71F76103B99B12009C0E0340800208FD71F,
    Does anyone know how I can get the actual value that I inserted into the nested table?
    your help is appreciated.<HR></BLOCKQUOTE>
    Try this:
    select value(t) from table t;
    Best regards, Marcelo.
    null

  • Selecting from two tables and confirming from them despites they not relate

    Please I need a query to select from two tables that are not related to each other.
    I also want to confirm data's as in verify wether what the user has entered is in accordance with what is in the tables
    Examples
    the first table is named "Card" and the second table is named "Student_Details"
    Card table contains a column named "Pin_Number".
    The Student_Details table contains fields such as Exam_Number, Name, Age, Sex.
    The user has to Enter the Pin_Number which has to be confirmed in the Card table and Exam_Number which has to be confirmed in the Student_Details table and verify that both data's are correct.
    Please I need the SQL and PL/SQL queries for this problem.
    Thanks

    Hi,
    I think you need two different queries
    You can write a procedure like:
    create or replace procedure p1 (p_pin_number number, p_exam_number)
    is
      r_card_row            card%rowtype;
      r_student_details     student_details%rowtype;
      cursor c1 is
      select *
        from card
       where pin_number = p_pin_number;
      cursor c2 is
      select *
        from student_details
       where exam_number = p_exam_number;
    begin
      open c1;
        loop
          fetch c1 into  r_card_row;
          exit when c1%notfound;
          ....  do whatever you want..... and the samething you can do with other cursor
        end loop;
      close c1;
    end p1;Hope this helps
    Ghulam

  • Why do i get integer values instead of decimals when selecting a mysql table through an oracle xe DB?

    Hi
    My company just started a new project that implies migrating every hour operational data from a mysql database located at another company to our main DB (oracle10gR2). Between these two DB, we have an oracle XE DB which contains the database links to both DB and a procedure to get (from mysql) and insert (oracle10g) the values. What happens is that in the mysql DB, the values have decimals and, when i select the table in oracle, i only see integer values (no decimals). Here is an example of the select i use:
    SELECT "v_hour", "v_date", "v_type", "v_tabstamp","v_value"
    FROM "tab1"@mysql;
    How can i work around this problem?
    Many thanks!

    Maybe just a HS_LANGUAGE setting issue.
    You could try that:
    1a) in the gateway init file, please set HS_LANGUAGE=GERMAN_GERMANY.WE8ISO8859P1
    2a) now open a new SQL*Plus session ans select from your table using the gateway based database link
    => if the values are now including the decimal part then your foreign database is set up to use a comma as the decimal separator and you have to make sure that the HS_LANGUAGE contains a territory that uses as decimal separator a comma.
    If you still do not get the decimal values, then change it to:
    1b) HS_LANGUAGE=american_america.we8iso8859P1
    2b) Make sure you start again a new SQL*Plus session (the gateway init file is only read when you use the database link in your session for the first time (or explicit closed it before). Select again from your table.
    => is the decimal part now visible?
    More details can be found in the gateway note: Gateway and Decimal Digits(Doc ID 1453148.1) available from My Oracle Support portal.
    - Klaus

  • Urgent. . .About select * from multiple tables

    When I am doing the 'Select * from tables' in JSP,
    sql = dbconn.prepareStatement("SELECT * FROM protein WHERE protein_id ='"+p_i+"'");
    It works, because I only select one table.
    Then, I change to select from two tables,
    sql = dbconn.prepareStatement("SELECT * FROM protein, fuses WHERE protein_id ='"+p_i+"'");
    It also works properly?
    However, When I do like:
    sql = dbconn.prepareStatement("SELECT * FROM protein, protein_taxa WHERE protein_id ='"+p_i+"'");
    It doesn?t work.
    So, I think it might be the problem that there is a common column 'protein_id' in both tables, although protein_taxa.protein_id is a foreign key of protein.protein_id. Therefore, I can select two table protein, fuses which have different columns, but no way to select the table they have same name column.
    However, it?s essential for me to select all the data from the database. Any way I could achieve it? Thanks a lot!!

    SELECT *
    FROM protein, protein_taxa
    WHERE protein.protein_id = 'a_protein_id'
    and protein.protein_id = protein_taxa.protein_id It would also be good to indicate which fields you want on the select clause. This will liberate the server to return two fields with the same name.
    SELECT protein.protein_id, protein.name, protein_taxa.taxa /* ??? */
    FROM protein, protein_taxa
    WHERE protein.protein_id = 'a_protein_id'
    and protein.protein_id = protein_taxa.protein_id

  • How to populate a table based on a row selection from another table.

    Hi, i just started to use ADF BC and Faces. Could some one help me or point me a solution on the following scenario .
    By using a search component , a table is being displayed as a search result. If i select any row in the resulted table , i need to populate an another table at the bottom of the same page from another view. These two tables are related by primary key . May i know how to populate a table based on a row selection from another table. Thanks
    ganesh

    I understand your requirement and the tutorial doesn't talk about Association between the views so that you can create a Master-Detail or in DB parlance, a Parent-Child relationship.
    I will assume that we are dealing with two entities here: Department and Employees where a particular Department has many Employees and hence a Parent-Child relationship.
    Firstly, you need to create an Association between the two Entities - Department and Employees. You can do that by right clicking on the model's entity and then associating the two entities with the appropriate key say, DepartmentId.
    Once you have done that, you need to link the two entities in the View section with this Association that you created. Then go to AppModule and make sure that in the Available View Objects: 'EmployeesView' appears under 'DepartmentView' as "EmployeesView via <link you created>". Shuttle the 'DepartmentView' to the right, Data Model and then shuttle
    "EmployeesView via <link you created>" to the right, Data Model under 'DepartmentView'.
    This will then be reflected in your Data Controls. After that, you simply would have to drag this View into your page as a Master-Detail form...and then when you run this page, any row selected in the Master table, would display the data in the Detail table.
    Also, refer to this link: [Master-Detail|http://baigsorcl.blogspot.com/2010/03/creating-master-detail-form-in-adf.html]
    Hope this helps.

  • Selecting from two tables but making it just one selection

    Is there a way to select from two tables and just have one selection appear?
    Specifically I have a fact_install_unit, and a fact_install_arch table.
    Sometimes the value exists in fact_install_unit.factory_timestamp, and sometimes when fact_install_unit.factory_timestamp is null I need to pull it from the fact_install_arch.factory_timestamp.
    sort of like:
    (select fact_install_unit.factory_timestamp
    from fact_install_unit, fact_install_arch
    where fact_install_unit.fl_unit_sak = fact_install_arch.fl_unit_sak
    and where fact_install_unit.factory_timestamp is null then display fact_install_arch.factory_timestamp)

    > I was just stating that I do not have sufficient priveleges to create views in this database.
    >
    nm means "no more" than that
    And how are we supposed to know that? You seem to have changed the thread subject to "unfortunately I only have read-only and insufficient priveleges", which is not even a question.
    nm means "New Mexico":
    http://www.myshortpencil.com/schooltalk/messages/85/515.html?971794944

  • Select from multiple tables without join statement

    Hey Gurus,
    I would like to make a select from a multiple tables to check if there is any reference to my data. I would like to do it with some elegancy, but I don't know how.
    Is in abap sql possible to do it only with the select statement?
    Or I was also think about a solution that I should fill some data structure with all of the tables which I want to select from and then just loop that data structure and do the select seperately from all of the tables. I just need to check if it founds some results, so no need to store it. If this solution would be fine what data structure should I use?
    Or can tell me what would be the best for this?
    My code for select from one table, which I want to make for multiple tables:
    SELECT SINGLE id_kniznice FROM zbr_t_autori INTO wa_id
           WHERE id_kniznice EQ ls_extract-zview-id_kniznice.
         IF sy-dbcnt > 0.
           MESSAGE i000(zbr_msgc_lib).
           ls_extract-flags-vim_mark = '*'.
           MODIFY extract FROM ls_extract.
    ENDIF.   
    Thank you for any posts.
    Regards,
    Robert

    And there we go again...
    Read this topic:
    For All Entries is NOT better than INNER JOIN in most cases
    And this one:
    inner join vs for all entries
    Also that one:
    Re: LOOP AT vs INNER JOIN
    JOINs are really better than for all entries in most cases. Problem is people tend to ignore basic things like using pks or indexes while making them.

  • Selection from different tables

    Hello Everyone,
    I have a situation where I have 15 fields in the selection screen.
    The selection is dependent on three or more tables.
    First I have selected from two tables but if the user enters values in the selection screen then how to make the selection.
    Tables dont have common fields between them. LIKP, LIPS, VTTK, VBUK and VEKP are the tables.
    Can you guys guide me.
    Thank you.

    Hi Vinod,
    First I have selected from two tables but if the user enters values in the selection screen then how to make the selection.
    Your query is not so clear. When are you fetching the data from two table whether before selection screen input (Initialization event) or after selection screen?
    Can you please elaborate your query and better if you post your Selection Screen screen-shot.
    Regards,
    VIjay

  • Music doesn't start when selected from playlist have to push pause then start. Always playing one track behind what is on screen

    Music doesn't start when selected from playlist have to push pause then start. Always playing one track behind what is on screen as my I-pad worksorks fine

    Same problem here, since upgrading to IOS-5.  Whenever I try to shuffle or play a genius mix (or even simply play an album) the iPod will skip the first one or two songs, play one song and then 'crash'.  I say 'crash' because it selects the next song and then nothing happens - the player isn't paused, and it appears to think it's playing, but the time bar doesn't change and no sounds come out.  Occasionally I've noticed the album artwork is wrong too.
    Rebooting does NOT work - I've tried it a number of times.
    Is this just an iPod problem??  If so, I would be surprised if Apple do anything quickly about it - they're more worried about iPhone problems I expect, and we (iPod users) are just the poor relations...  C'mon Apple - SORT IT OUT!!!!

  • Windows 8.1 account limit problem when downloading from store

    windows 8.1 account limit problem when downloading from store        
    I have 250 windows 8.1 tablets.
    I figured since you can use the same account on 81 devices id create 4 accounts.
    I need to download more than 25 free apps from the store
    on each tablet. Putting the same account don't work. (comes up with an error after putting on to many devices that you cant use this account now).
    Whats the best way to do this ? and what if I need to download a paid app ?
    Thank You.

    Hi,
    As far as I know, One Microsoft Account may bound at most five Trusted computers. There is no way to break this limitation.
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • How to do a SELECT from different tables into an internal table?

    How to do a SELECT from different tables into an internal table?
    I want to select data from MARA, MARC and ZPERSON and populate my ITAB_FINAL
    REPORT  zinternal_table.
    TABLES:
      mara,
      marc,
      zperson.
    TYPES:
    BEGIN OF str_table1,
      v_name LIKE zperson-zname,
      v_matnr LIKE marc-matnr,
      v_emarc LIKE marc-emarc,
      v_werks_d LIKE marc-werks_d,
      v_dstat LIKE marc-dstat,
      END OF str_table,
      i_table1 TYPE STANDARD TABLE OF str_table1.
    DATA:
    BEGIN OF str_table2,
    v_mandt LIKE mara-mandt,
    v_ernam LIKE mara-ernam,
      v_laeda LIKE mara-laeda,
    END OF str_table2,
    itab_final LIKE STANDARD TABLE OF str_table2.

    first find the link between mara , marc and zperson , if u have link to 3 tables then u can jus write a join and populate the table u want ( thats final table with all the fields).
    u defenitely have alink between mara and marc so join them and retrieve all data into one internal table.
    then for all the entries in that internal table retrieve data from zperson into another internal table.
    then loop at one internal table
    read another internal table where key equals in both the tables.
    finally assign fileds if sy-subrc = 0.
    gs_finaltable-matnr = gs_table-matnr
    etc...
    and finally append gs_finaltable to gt_finaltable.
    there u go ur final table has all the data u want.
    regards
    Edited by: BrightSide on Apr 2, 2009 3:49 PM

Maybe you are looking for

  • Sales Order: Item Field Layout

    I would like to change the order in which fields of Sales Order Item display in. Basically move some fields forward so client does not need to scroll so far to right to maintain for example Order number. Is there a place in config where you can contr

  • How to select more than one free characteristics in web report?

    Hi, From the performance point of view, I want to select more than one free characteristics to be displayed in WEB report. I know in BEx Analyzer, we can do this by right mouse click and choose' query property' from the context menu, all the free cha

  • Compressor Blu-ray with more than one sequence ?

    Is it possible to create a blu-ray from the "New Batch from template..." of Compressor with more than one sequence ? Message was edited by: Rudy A-Traxx

  • ADWS Broken after in-place upgrade from Server 2008 R2 to Server 2012 R2

    I performed an in-place upgrade from 64-bit Server 2008 R2 to Server 2012 R2.  This machine ran Active Directory Web Services. After the upgrade ADWS will not start. I get the following event log error: Log Name:      Application Source:        .NET

  • How to playback a digital waveform

    Hi I would like to do some post processing work on a digital graph data. I would like to use 2 seperate VIs for data acquisation and post processing. So first I acquire the data  then pass the whole waveform data as an input to the other subVI but I