How data retrieves from an Oracle table

Hi,
I have inserted record by record with record_number in a Oracle table. I have executed below query in PL/SQL developer. It displayed the result in same sequence order how I have inserted. But when in Toad it given in different order which does not have any sequence.
select * from bbs_user
Anyone please explain this why it is? Please treat this as very urgent.
Thanks in advance.

Welcome to the forums.
In a forum of volunteers, not being a support forum, there is no such thing as 'very urgent'. Your use of this two words in your very first post must be considered insulting and rude.
Also it appears you are completely clueless with respect to relational databases. Relational databases are about sets.
By definition -in mathematics- a set has no order.
If you want your data ordered you must use the ORDER BY clause in your SELECT statement.
Also I notice both Pl/SQL developer and Toad are non-Oracle products, so questions about these products do not belong in this forum.
Sybrand Bakker
Senior Oracle DBA

Similar Messages

  • Data retrieval from 8 db tables

    Hi Folks,
    We haev a requirement where we need to query 7 tables to retrieve some data and display it in the form of a list.
    This report is to be executed in background.
    Right now we have 3 select statements, each of which has inner joins on 2-3 tables and uses "for all entries".
    Performance wise which would be a better option - to keep it this way, or have separate select statement for each table and then read statements on internal tabels for output?
    Thanks in advance,
    Munish

    Hi,
    I think it depends on the balance between ABAP time and Database time.
    If you select all the data from tables independently and then do looping etc,
    it will increase the hits as well as the ABAP time.
    So the next best option is a mix of both. I believe the current approach holds good.
    As, has been mentioned before also in this thread, you can improve the performance if the joins are being made on key fields since this reduced overhead.
    If I were using tables which had all been joined with key fields I would have gone as high as with 5 Joins but I guess this is an ideal scenario so a join of 2-3 tables is a decent approach.
    And the subsequent handling in ABAP is the only next step.
    So this approach is fine and you should incorporate correct performance guidelines which you can find in this forum if you search for them.
    Regards
    Nishant

  • How to export data from a Oracle table to a delimited file?

    I know how to load delimited file into a table, but how to export
    data from a Oracle table to a delimited file?
    Thanks in advance.

    Try looking at this link, it's long but there's three different solutions discussed in it. If you look at Barbara Boehmer's
    solution in her posts in the link below you'll see that she's addressed your concerns with spool files.
    Re: utl_smtp and triggers

  • OBIEE 11g - Combine data from two Oracle tables

    Good day!
    I tried to combine data from two Oracle tables as fact data, but it doesn't work.
    My steps: I created SCOTT.EMP2 table from SCOTT.EMP table, update EMPNO and ENAME values of EMP2 table to distinguish data of my tables. Then I imported physical tables DEPT, EMP and EMP2 to BIEE 11g, created joins DEPT-EMP and DEPT-EMP2 in physical diagram. Then I dragged DEPT and EMP tables to BMM, and EMP2 table to EMP as second LTS. In Content tab for EMP and EMP2 I checked "This source should be combined with other sources at this level" checkboxes. Then I renamed logical tables EMP and DEPT to Employees and Departments and dragged them to Presentation area. In Answers I created Analysis with columns DNAME and ENAME.
    The problem is that data on results tab is only from one physical table EMP or EMP2 (depending on the order of sources EMP and EMP2 of LT Employees) and not from both.
    Can anybody help? Am I missed something?
    Al.

    Hi Al,
    I think you have to define the content of the LTS.
    http://download.oracle.com/docs/cd/E12096_01/books/admintool/admintool_BusModSetup16.html
    You have to specify the content of the different fragments.
    http://download.oracle.com/docs/cd/E12096_01/books/admintool/admintool_SetUpAggNav3.html#wp1005333
    Maybe you have to add an additional column 'Source' ('EMP1', 'EMP2')
    Good Luck,
    Daan Bakboord
    http://obibb.wordpress.com

  • Tell me how to format a date retrieved from a MS SQL Server 2000 database?

    Tell me how to format a date retrieved from an MS SQL Server 2000 database for various uses in my JSP page?

    Or if you want to use JSTL instead of a scriptlet see:
    http://forum.java.sun.com/thread.jspa?threadID=676754&tstart=0

  • Data Retrieval Speed in Oracle Spatial vs. ESRI ArcSDE

    I would appreciate any opinions regarding data retrieval
    performance between Oracle Spatial and ESRI ArcSDE. Would an end-
    user (using ESRI software) experience significant differences in
    data retrieval speed depending on how the data were stored in
    Oracle (MDSYS.SDO_GEOMETRY verses ESRI Binary/Blob formats).
    Knowing that the ESRI binary formats are tailored to their
    software front-end apps (ArcGIS, ArcMap, ArcCatalog, and
    ArcInfo), wouldn't this be a "non-issue" until the spatial
    dataset gets "large", and even then, wouldn't performance be
    (almost) equal if the spatial indexes were created properly?
    Thanks for your inputs,
    Bruce

    John,
    You can't do that type of query in sql from sql*plus using
    SDEBINARY. HOwever, you can perform spatial queries in ArcMap
    if you are using SDEBINARY.
    You can use the query builder to perform point-in-polygon type
    queries.
    Hope that helps.
    For my two cents, I think SDO_GEOMETRY gives you a more robust
    database to work with, because you have the added power of
    Oracle Spatial functions. If you are using SDEBINARY you are
    limited to only what you can do thru ArcGIS.
    If you are concerned more about performance than accessibility,
    especially with a large number of users, then SDEBINARY might
    be the better choice.
    I love Oracle Spatial and am hoping that the performance issue
    will not be a serious one when we start putting ArcIMS developed
    apps into production.
    Dave

  • How to query from the xml table a single, specified element.

    I'm quite new in Xml Db. Pleas, can anybody tell me how to query from the xml table below a single element (i.e. the element 'rapportoparentela = NIPOTE' related to the element 'codicefiscale = CRRVNC76R52G337R', or the element 'rapportoparentela = FIGLIO' related to the element 'codicefiscale = CRRRNT51L23G337Q')?
    - <dati xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <codiceinterno />
    <codicefiscaleassistito>CRRMNL81R31G337H</codicefiscaleassistito>
    - <famigliare>
    <codicefiscale>CRRVNC76R52G337R</codicefiscale>
    <rapportoparentela>NIPOTE</rapportoparentela>
    </famigliare>
    - <famigliare>
    <codicefiscale>CRRRNT51L23G337Q</codicefiscale>
    <rapportoparentela>FIGLIO</rapportoparentela>
    </famigliare>
    - <famigliare>
    <codicefiscale>CBRPRN15S65E080W</codicefiscale>
    <rapportoparentela>I.S.</rapportoparentela>
    </famigliare>
    - <famigliare>
    <codicefiscale>CRRMNL81R31G337H</codicefiscale>
    <rapportoparentela>NIPOTE</rapportoparentela>
    </famigliare>
    - <famigliare>
    <codicefiscale>BCCCML54C50I845G</codicefiscale>
    <rapportoparentela>NUORA</rapportoparentela>
    </famigliare>
    </dati>
    Using SELECT extractValue(value(t),'/rapportoparentela') into result FROM NF_XMLT X,
    TABLE ( xmlsequence (extract(value(X),'/dati/famigliare/rapportoparentela'))) t
    I get all the elements 'rapportoparentela' and I want to get only one specified.
    Regards.
    Piero

    Piero,
    you can add the condition "CRRVNC76R52G337R" to your xpath-expression like:
    SELECT extractValue(value(t),'/rapportoparentela')
    FROM NF_XMLT x
    ,TABLE ( xmlsequence (extract(value(X),'/dati/famigliare[rapportoparentela="CRRVNC76R52G337R"]'))) tto select only those famigliare-elements that have a child-element rapportoparentela with value "CRRVNC76R52G337R".
    When you stored your XML in an XMLType column in the table, i think the following queries are better:
    SELECT extractValue(x.your_XMLType_column,'/dati/famigliare/rapportoparentela')
    FROM NF_XMLT x
    WHERE extractValue(x.your_XMLType_column,'/dati/famigliare/codicefiscale')
    = 'CRRVNC76R52G337R'or
    SELECT extractValue(x.your_XMLType_column,'/dati/famigliare/rapportoparentela')
    FROM NF_XMLT x
    WHERE existsNode(x.your_XMLType_column,'/dati/famigliare[codicefiscale="CRRVNC76R52G337R"]')
    != 0

  • Built in Function to Populate an access table from an Oracle Table through VB 6.0

    Dear all,
    Is there any built in function in VB 6.0 to populate an access table directly from an oracle table or SQL Server(Assume Both has the same columns & data type).
    (Just like the DoCmd command which can be used to populate an excel sheet directly from an access table).
    Please help.
    Regards
    Sibby.

    Sibby,
    There is no "built-in" code in VB that I am aware of. However, you could use this code which I wrote for SQL Server. For Oracle, you would have to change to the appropriate table to get all the table names. You can filter by table name to get just your tables like I did below (My_).
    '* Now select all the files and add to access.
    sSQL = "SELECT name, id FROM sysobjects WHERE xtype = 'U' AND SUBSTRING(name, 1, 3) = 'My_' ORDER BY name"
    Set rstTemp = OpenRdSetView(sSQL:=sSQL, adoConnection:=adoConnection)
    On Error GoTo TableExistError
    '* Loop through all my database tables and copy to the Access database.
    With rstTemp
    Do While Not .EOF
    '* Copy this to the Access backup database.
    sTableName = .Fields("Name").Value
    '* Select all records from the SQL Server table and copy to the local Access database.
    sSQL = "SELECT * INTO " & sTableName & " FROM "
    sSQL = sSQL & "[odbc;dsn=" & sDSN & ";UID=" & sUID & ";pwd=" & spwd & ";]." & sTableName
    adoBackupConnection.Execute sSQL, , adExecuteNoRecords
    '* Go to next table.
    .MoveNext
    Loop
    End With

  • How to provide joins between oracle tables and sql server tables

    Hi,
    I have a requirement that i need to generate a report form two different data base. i.e Oracle and Sql Server.
    how to provide joins between oracle tables and sql server tables ? Any help on this
    Regards,
    Malli

    user10675696 wrote:
    I have a requirement that i need to generate a report form two different data base. i.e Oracle and Sql Server. Bad idea most times. Heterogeneous joins do not exactly scale and performance can be severely degraded by network speed and b/w availability. And there is nothing you can do in the application and database layers to address performance issue at the network level in this case - your code's performance is simply at the mercy of network performance. With a single glaring fact - network performance is continually degrading. All the time. Always. Until it is upgraded. When the performance degradation starts all over again.
    If the tables are not small (few 1000 rows each) and row volumes static, I would not consider doing a heterogeneous join. Instead I would rather go for a materialised view on the Oracle side, use a proper table and index structure, and do a local database join.

  • How data is populated in EUL5_QPP_STATS table?

    there are  few reports that are run monthly and the records of executed Discoverer reports were stored in EUL5_QPP_STATS table. But the information stopped getting recorded in this table from april 2014. Can anyone tell me how data is inserted in this table and whats is the cause of this issue.

    Hi
    Can anyone Please answer to my question

  • Data Extraction from AR Aging Tables to Acess

    Hi
    I used to work on developing the reports.But I am a new to the Data Extraction from AR Aging Tables into Acess and the data is upload from Acess to SAP.
    Can anybody help me to relove this issue.I really appreciate to you.After mapping then the data is loaded to SAP.

    Hi
    I used to work on developing the reports.But I am a new to the Data Extraction from AR Aging Tables into Acess and the data is upload from Acess to SAP.
    Can anybody help me to relove this issue.I really appreciate to you.After mapping then the data is loaded to SAP.

  • How to prevent from starting oracle server every time i start windows?

    I have winXP professinonal, and i would like to know how to prevent from starting oracle server every time i start windows. Because it really slows starting the windows. Thanks

    The scripts above seems to work as intended with no errors and do indeed stop my five XE services. I created the second script to start them and they do indeed start and are listed as "Started" in the Services panel aferwards.
    My XE installation has the 5 services set up to start automatically.
    I was happy to find the script above because I did not know the starting order and using the XE shortcuts for "Stop Database" and "Start Database" just seemed to cause sqlplus to receive ORA-12514 "listener does not currently know of service..." after trying to use them to restart the database. Using the scripts above seems to leave me with a different error.
    I am pretty sure I eliminated my 9i listener and it is no longer listed in my Services panel or the registry.
    Restarting the laptop does start the services correctly, and now I am on to a more pressing JDBC error, so if I get a chance to use the script again, I will post my results. Thanks.

  • Fast data retrieval from large tables

    Hello,
    we have created a table in oracle 10g DB. at an average there are around 20-30 rows inserted onto the table. so in 1 mnth the record count for the table is around 800-900 rows.
    in one year which is becoming to 10,000 rows. so speed up data retreval from this bulk data we need suggestion. various things that come to my mind are -
    Indexing of table/# Index of table/partitioning of table/materialized view etc.
    but not sure what exactly needs to be done here. please suggest on how smooth data retreival can be chaived whatever be the size of the table.
    Thanks,
    Sam

    Here is a simple look of your data progression.
    year        Row
    1           10,000
    5           50,000
    10          1,00,000
    50          5,00,000
    100         10,00,000You need to wait another 100 years to reach a million. And million is not a big number when it comes to Oracle.
    So as others have stated what the objective behind your question?
    basically the choice of Index or Partition mainly depends on how the data is going to be accessed from a table. If I am going to access all the rows of a table every time then there is no use of both the features. I would just prefer a FTS. In that situation i would be looking how to optimize my FTS.
    So you need to set you objective clear before picking up the solution. Just because you have a hammer you cant go around banging the wall ;)

  • Saving data retrieved from text file to JDBC table

    Hi,
    I would like to save data, loaded from a text file to a dataset, into an existing JDBC table.
    The documentation I found on this subject is very brief, and no matter how I tried, I couldn't succeed.
    I would appreciate any help.
    Thank you in advance

    Hi there,
    Here is an example of reading a String and a date from a text file. Once you have what you need in the Strings (or whatever) it should be easy to insert them into and SQL statement. Let me know if you need an example of this as well and I'll post it in the morning. Right now I'm off to bed :o)
    Cheers
    Mark
    import java.io.*;
    import java.util.*;
    import java.text.*;
    public class WriteTest {
    public static void main(String [] arg) throws Exception {          
       Date today = new Date();          
       String name = "";          
       SimpleDateFormat formatter = new SimpleDateFormat("ddMMyyyy");          
       File myfile = new File("hello.txt");               
       // how to input     
       BufferedReader in = new BufferedReader(new FileReader(myfile));          
       String name="",
       date="";          
       boolean eof = false;          
       do {
          name = in.readLine();               
          date = in.readLine();               
          if(!(eof = (name==null || date==null)))                    
          System.out.println(name+" "+formatter.parse(date));
       while(!eof);     
    }

  • Function modules for data retrieval from diff. tables

    Hi,
    I would just like to ask if there are function modules that can be used to retrieve data from the ff. tables:
    TSAD3T
    KNVV
    ESTRH
    for TSAD3T i need to get the value of title_medi
    for KNVV    i need to get the fields klabc vkorg vtweg
    for ESTRH  i need to get the fields subcat subid.
    Thanks.

    I doubt if you have such a FM

Maybe you are looking for