'select count(*) from x' returns 5460 rows and 'Select * from x' returns 0 rows

As you can see in the next lines something is wrong in my Oracle (8.0.6 on Win NT 4.0 sp 6a) :
Oracle8 Enterprise Edition Release 8.0.6.0.0 - Production
With the Partitioning option
PL/SQL Release 8.0.6.0.0 - Production
SQLWKS> SELECT * FROM V_TERRA_TE;
PERIOD_DATE PERIOD_TIME TERRARCV TERRASND TERCV TESND
0 rows selected.
SQLWKS> SELECT COUNT(*) FROM V_TERRA_TE;
COUNT(*)
5460
1 row selected.
V_TERRA_TE is a complex join of 5 Tables :
CREATE OR REPLACE VIEW "ACTUATE".V_TERRA_TE AS Select to_date(to_char(p1.period_date,'YYYYMMDD'),'YYYYMMDD') "PERIOD_DATE",
to_date(to_char(p1.period_time,'HH24:MI'),'HH24:MI') "PERIOD_TIME",
to_number(p1.caudalrcv + ((p3.caudalrcv + p4.caudalrcv)*(confterrate.conexadslterra/confterrate.conexadsltotal))) "TERRARCV",
to_number(p1.caudalsnd + ((p3.caudalsnd + p4.caudalsnd)*(confterrate.conexadslterra/confterrate.conexadsltotal))) "TERRASND",
to_number((p2.caudalrcv * confterrate.pctinfonegocio) + ((p3.caudalrcv + p4.caudalrcv)*(confterrate.conexadslte/confterrate.conexadsltotal)))"TERCV",
to_number((p2.caudalsnd * confterrate.pctinfonegocio) + ((p3.caudalsnd + p4.caudalsnd)*(confterrate.conexadslte/confterrate.conexadsltotal)))"TESND"
from p1,p2,p3,p4,confterrate
where (p1.period_date=p2.period_date)and
(p1.period_date=p3.period_date)and
(p1.period_date=p4.period_date)and
(p1.period_time=p3.period_time)and
(p1.period_time=p4.period_time)and
(p1.period_time=p2.period_time)and
to_char(p1.period_date,'MMYYYY')=to_char(confterrate.period_datetime,'MMYYYY');
I think that some not reported error happens in the select * with some temporary space or similar but only the message '0 rows selected' is displayed (instead the real error)
Could somebody help me ?
Thanks in advance
Francisco

Forcing the Join/sort to be made on Disk (not on memory) the problem not happens. This demostrate that ORACLE has a VERY IMPORTANT BUG : It returns 0 rows wich is false.
To force it to work on disk i use this parameters :
alter session set sort_area_size=0
alter session set hash_join_enabled=false
Note : probably is not the best combination or use of parameters, but using it the query works as espected.

Similar Messages

  • Select row and column from header in jtable

    hello i have a problem to select row and column from header in jtable..
    can somebody give me an idea on how to write the program on it.

    Hi Vicky Liu,
    Thank you for your reply. I'm sorry for not clear question.
    Answer for your question:
    1. First value of Open is item fiels in Dataset2 and this value only for first month (january). But for other month Open value get from Close in previous month.
    * I have 2 Dataset , Dataset1 is all data for show in my report. Dataset2 is only first Open for first month
    2. the picture for detail of my report
    Detail for Red number:
    1. tb_Open -> tb_Close in previous month but first month from item field in Dataset2
    espression =FormatNumber(Code.GetOpening(Fields!month.Value,First(Fields!open.Value, "Dataset2")))
    2. tb_TOTAL1 group on item_part = 1
    expression =FormatNumber(Sum(CDbl(Fields!budget.Value)))
    3. tb_TOTAL2 group on item_part = 3 or item_part = 4
    expression =FormatNumber(Sum(CDbl(Fields!budget.Value)) + ReportItems!tb_TOTAL1.Value )
    4. tb_TOTAL3 group on item_part = 2
    expression =FormatNumber(Sum(CDbl(Fields!budget.Value)) - ReportItems!tb_TOTAL2 .Value)
    5. tb_Close -> calculate from tb_TOTAL3 - tb_Open
    expression =FormatNumber(Code.GetClosing(ReportItems!tb_TOTAL3.Value,ReportItems!tb_Open.Value))
    I want to calculate the value of tb_Open and tb_Close. I try to use custom code for calculate them. tb_close is correct but tb_Open is not correct that show value = 0 .
    My custom code:
    Dim Shared prev_close As Double
    Dim Shared now_close As Double
    Dim Shared now_open As Double
    Public Function GetClosing(TOTAL3 as Double,NowOpening as Double)
        now_close = TOTAL3 + NowOpening
        prev_close = now_close
        Return now_close
    End Function
    Public Function GetOpening(Month as String,NowOpen as Double)
        If Month = "1" Then
            now_open = NowOpen
        Else    
            now_open = prev_close
        End If
        Return now_open
    End Function
    Thanks alot for your help!
    Regards
    Panda A

  • Remove specific row and column from 2d array

    Hi,
    I would like to know how to remove the specific row and column from 2d array.
    for example, I have the original 4x4 array as below
    2 -1 -1 0
    -1 2 0 -1
    -1 -1 2 0
    -1 -1 -1 3
    let say that i want to remove row 2(bold) and column 2(bold), and the new 2d array should get as below
    2 -1 0
    -1 2 -1
    -1 -1 3
    Thanks.

    You can't remove elements of an array, it's fixed at a certain size once created. What you can do however is make a new array and only copy the things you want. Something like:public static void main(String[] args) {
        Integer[][] bar = new Integer[5][5];
        for (int i = 0; i < bar.length; i++) {
            Integer[] baz = bar;
    Arrays.fill(baz, i);
    System.out.println(Arrays.toString(baz));
    Integer[][] muu = new Integer[5][4];
    removeColumn(3, bar, muu);
    for (Integer[] mee : muu) {
    System.out.println(Arrays.toString(mee));
    Integer[][] smuu = new Integer[4][5];
    removeRow(3, bar, smuu);
    for (Integer[] mee : smuu) {
    System.out.println(Arrays.toString(mee));
    public static <T> void removeRow(int row, T[][] a, T[][] result) {
    if (row >= a.length) {
    throw new IllegalArgumentException("no row at " + row);
    for (int a_r = 0, result_r = 0; a_r < a.length; a_r++) {
    if (a_r == row) {
    continue;
    System.arraycopy(a[a_r], 0, result[result_r], 0, a[a_r].length);
    result_r++;
    public static <T> void removeColumn(int col, T[][] a, T[][] result) {
    for (int i = 0; i < a.length; i++) {
    if (col >= a[i].length) {
    throw new IllegalArgumentException("no column at [" + i + ", " + col + "]");
    for (int a_i = 0, r_i = 0; a_i < a[i].length; a_i++) {
    if (a_i == col) {
    continue;
    result[i][r_i] = a[i][a_i];
    r_i++;

  • HT1476 Charging an iPhone is there any difference from charging in a car and charging from a wall outlet?

    Charging an iPhone is there any difference from charging in a car and charging from a wall outlet?

    As long as both chargers meet the required specs, no.

  • Adding or Deleting Rows and Columns from Tables

    I have notices that you can't delete or add a row or columns from a table in iWeb without having problems.
    You may get two added or deleted.
    I should indicate that the table comes from Excel.
    Does anyone know of a work-around?

    Problem 1 - The sub-form 'Stds' was not configured for repeating rows.
    Problem 2 - The script was on the wrong event. The script should be on the 'change' event and not the 'initialize' event.
    Problem 3 - Which header row in which sub-form are you referring too?
    Steve

  • Old IMAC with 10.5.6 OSX. Forgot Administrator password. Started up from OSX install disc 1 and selected password reset from utilies in Installer. But HD icon doesn't show up. (Only install disc and admin root available:no good). What can I do?

    Old IMAC with 10.5.6 OSX. Forgot Administrator password (which I had already changed.) Followed instructions as per http://support.apple.com/kb/HT1274
    Started up from the original OSX install disc 1 and selected "Password reset" from "utilies" in Installer. But HD icon doesn't show up. (Only install disc and admin root available:no good as the support website underscores: Important: Do not select "System Administrator (root)". This is actually the root user. You should not confuse it with a normal administrator account.).
    What can I do?
    Thanks for your suggestions. Antonio

    Not familiar with that version of OS X but try using Terminal and type in resetpassword. If that brings up a password reset screen is your original username shown?

  • How to stop "Add Row" and "Delete" from committing.

    Hello, I am new to Application Express, and maybe someone can help me make this save like an Oracle Form.
    If you hit the "Add Row" button, enter data, then hit the "Add Row" button again, it commits the first row. If you check a value and hit the "Delete" button, it commits the delete. I would like the insertions and deletes to be handled like an update, that is with an explicit commit by hitting the "Apply Changes" button.
    Can I control this in Application Express, and how?
    Thank you,

    Kevin,
    1. instead of having a form on a table, you would create a form on a collection,
    2. collection is also a table but it is only of a temporary nature - it is valid with the corresponding session. Once the session is closed, you can't access the collection.
    3. to see how to create a collection and a tabular form use this example:
    http://htmldb.oracle.com/pls/otn/f?p=31517:176
    4. add row and delete will add / delete a copy of your table data. You can then create a process to save the data in your target table only if the button apply changes is clicked.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Calls from Sip Trunk to UC540 and then to CUE returned ** Service Unavailable**

    Hi to all
    i have something strange here and i need your assistance
    Call Flow:
    Sip trunk-->UC540--> CUE
    When calls coming to UC540 from outside and then going to cue then we send back service unavailable.I made a translation and i sent directly the incoming calls to CUE
    The same behavior is also if i send the calls to dummy number and then from there set forward all to voice mail.
    Incoming voicemail is working fine
    Incoming calls to phones also ok
    Uc540: 8.6
    CUE: 8.6.5
    A number: 99999999
    B number: 22777777
    Voice Mail Number:111
    Attached is the trace
    i see that we hit the correct dial peers .
    I have enable only trancoder since MTP is not register ( don't know why , but i don't think also that is necessary..
    voice service voip
     ip address trusted list
      ipv4 172.16.80.0 255.255.255.0
      ipv4 172.16.81.0 255.255.255.0
     allow-connections sip to sip
     supplementary-service h450.12
     no supplementary-service sip moved-temporarily
     no supplementary-service sip refer
     supplementary-service media-renegotiate
     sip
      no update-callerid
    dial-peer voice 1000 voip
     description **SIP TRUNK**
     translation-profile incoming SIP-INCOMING
     translation-profile outgoing SIP-OUTGOING
     destination-pattern 9T
     modem passthrough nse codec g711alaw
     session protocol sipv2
     session target sip-server
     incoming called-number .T
     voice-class codec 2  
     voice-class sip dtmf-relay force rtp-nte
     dtmf-relay rtp-nte
     fax-relay ecm disable
     no fax-relay sg3-to-g3
     fax rate 9600
     fax protocol pass-through g711alaw
     no vad
    dial-peer voice 2001 voip
     description ** cue voicemail pilot number **
     destination-pattern 111
     b2bua
     session protocol sipv2
     session target ipv4:10.1.10.1
     incoming called-number 111
     no voice-class sip outbound-proxy   
     dtmf-relay sip-notify
     codec g711ulaw
     no vad
    Regards
    chrysostomos

    Hi
    Interface                  IP-Address      OK? Method Status                Protocol
    FastEthernet0/0            unassigned      YES NVRAM  up                    up
    FastEthernet0/0.10         192.168.0.10    YES DHCP   up                    up   ----> For internet
    FastEthernet0/0.20         10.151.5.130    YES NVRAM  up                    up  ------> For sip trunk
    In0/0                      10.1.10.2       YES unset  up                    up    --------> default gw for cue
    Vlan1                      unassigned      YES unset  up                    up
    Vlan100                    unassigned      YES unset  up                    up
    Vlan200                    unassigned      YES unset  up                    down
    Vlan300                    unassigned      YES unset  up                    down
    NVI0                       10.1.10.2       YES unset  up                    up
    BVI1                       192.168.20.1    YES NVRAM  up                    up
    BVI100                     10.1.1.1        YES NVRAM  up                    up   ---------> ip for cme
    Loopback0                  10.1.10.2       YES NVRAM  up                    up   ------> default gw for cue
    dial-peer voice 2001 voip
     description ** cue voicemail pilot number **
     destination-pattern 111
     b2bua
     session protocol sipv2
     session target ipv4:10.1.10.1
     incoming called-number 111
     no voice-class sip outbound-proxy
     voice-class sip bind control source-interface BVI100
     voice-class sip bind media source-interface BVI100
     dtmf-relay sip-notify
     codec g711ulaw
     no vad
    interface FastEthernet0/0.10
     description **FOR INTERNET**
     encapsulation dot1Q 10
     ip address dhcp
     ip access-group 105 in
     ip nat outside
     ip inspect SDM_LOW out
     ip virtual-reassembly in
    interface FastEthernet0/0.20
     description **FOR SIP TRUNK WITH ISP**
     encapsulation dot1Q 20
     ip address 10.151.5.130 255.255.255.240
    ip route 10.1.10.1 255.255.255.255 Integrated-Service-Engine0/0
    ping 10.1.10.1 source bvi100
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 10.1.10.1, timeout is 2 seconds:
    Packet sent with a source address of 10.1.1.1
    Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
    I have bind the interface of cme ( 10.1.1.1) but the call fails again
    Attached is the trace
    Anything to advice?

  • IPhoto nightmare. Tried to import photos using Nikon software for the first time and all my photos disappeared from iPhoto 8.1.2 (and everything from itunes too). Newly reinstalled iPhoto crashes as soon as I import anything now.

    Macbook OSX 10.5.8, iPhoto 8.1.2. I just tried to import some photos using Nikon software (View NX2) for the first time. When I next looked into iPhoto it was empty (so was iTunes but that's another story). I had backed up photos fairly recently but don't use time machine. Searched in vain everywhere and must have done something wrong because iPhoto wouldn't then open at all, saying it was unreadable. After a lot more attempts to recover I uninstalled iPhoto and the receipts and reinstalled from my original disc. It seemed to be ok and imported some photos from my iphone but as soon as the import is complete iPhoto crashes and when opened again it is empty. Have tried this several times and have shut down and have tried rebuilding with the alt and cmd buttons but nothing seems to help. Any ideas?

    not a reply but not sure how to add something to my own thread! It seems that Desktop was damaged too as when I try to open it a screen says there is no application selected to open Desktop with. No idea what I should choose! Any help appreciated, have really made a mess of my MacBook this time.

  • Options of fetching mails from mail server into PI and also from oracle system

    hi All,
    Pls extend your help in looking out the possiblity of fetching mails from mail server into SAP PI
    and also from oracle system into PI ,earliest help would be appreciated.
    and also the types of sources for both the scenarios.
    Regards
    Vidya Sagar Manda

    Hi Vidya,
    you can use the email adapter to read/pick up email from mail box.
    and use JDBC adapter to read data from table of any database. Please refer the links given to your old thread
    Fetch Mails From MailServer using PI and integrate the message into BPM
    regards,
    Harish

  • Used the file transfer software from Apple to move music and photos from PC to iMac and can't find the files on iMac even though it was "successful" any help?

    Used the file transfer software from Apple to move music and photos to iMac.  After several hours it was "successful" but I can't locate it on the iMac.  Any ideas for the rookie?

    The music should be in iTunes and your photos should be in iPhoto. What happens if you launch those applications?
    Best of luck.

  • Not able to select and copy from adf table in IE and chrome if we enable row selection

    Hi All,
    We have an adf table and user wants to select and copy table cell values.
    We enabled row selection on adf table. Ifrow selection is in place, IE and Chrome are not allowing user to select and copy data. But Firefox is allowing.
    Do we have any solution to this? For our customer IE is the standard browser and they do test app on IE.
    Regards
    PavanKumar

    Hi Timo,
    Sorry forgot to mention versions.
    We are using 11.1.1.7 and IE 9.
    I tried in Google but could not get the solution.
    Kindly let me know solution for this.
    PavanKumar

  • Returning operation, table and column from a sql query

    Hi,
    I am working on Oracle 10g and i have to do achieve something like this.
    i have to create procedure or functions which will accept a SQL query and will return following :
    1).  Operation like 'SELECT', 'INSERT', 'UPDATE', 'DELETE' etc.
    2).  Column names
    3).  Table involved.
    One way to achieve this would be through hard parsing of string which might be time consuming. So do we have any in-built oracle package or function for the same job ?
    Regards,
    Vikas Kumar

    Check for DBMS_SQL package and DESCRIBE_COLUMNS procedure in that package.
    You might need a combination of this package and Hard parsing of the input string.
    For operation you can trim any space and brackets using TRIM function and then you can extrcat first 6 characters using SUBSTR for Operation.
    I have not worked or used DBMS_SQL so wont be able to help you much on this.
    Here is the link for DBMS_SQL
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_sql.htm#i1026120
    Regards
    Arun

  • Importing rows and columns from Excel to Cluster and Array in Labview

    An excel table consist of  4 columns and variable number of rows, the first column is the position number and the other 3 columns are series of coordinates (X,Y,Z). I would like to import the excel table into Labview such that each row in the table will form a cluster which consist of the position number and the coordinates of each position and each formed cluster should converted to a 1D-Array(double).
    I would be glad if someone can tell me the best way to go about this or better still show me some examples because i am very new in Labview.
    Thanks
    Omoba

    The easy way would be to save the excel file as csv (colon seperated values) and load it into ascii via load spreadsheet file (use ; as delimiter).
    The more advanced way is to interface excel via ActiveX. Use the example finder and search for ActiveX to find some examples that interface excel (they should be shipped with LabVIEW).
    Post back if you have more detailed questions. 
    Felix 
    www.aescusoft.de
    My latest community nugget on producer/consumer design
    My current blog: A journey through uml

  • Sum of first 50% of rows and remaining 50% of the rows seperately

    Hi
    I have a table
    create table eresults
    (student_name varchar2(20),
    section_name varchar2(4),
    exam_id NUMBER (4))
    marks NUMBER (3))
    Begin
    insert into eresults values ('MOEED', 'A', 1, 20);
    insert into eresults values ('SARAH', 'A', 1, 30);
    insert into eresults values ('SAM', 'A', 1, 24);
    insert into eresults values ('MOEED', 'A', 2, 65);
    insert into eresults values ('SARAH', 'A', 2, 100);
    insert into eresults values ('SAM', 'A', 2, 4);
    insert into eresults values ('MOEED', 'A', 3, 34);
    insert into eresults values ('SARAH', 'A', 3, 10);
    insert into eresults values ('SAM', 'A', 3, 40);
    insert into eresults values ('SARAH', 'A', 4, 33);
    insert into eresults values ('SAM', 'A', 4, 99);
    end;
    / I want to take a sum of marks, group by student name, for each student in such a way that their first 50% of exams (order by exam id) marks sum is shown seperately in a column and the remaining 50% of the exams summed marks are shown in another column. For students appearing in odd number of exams, like 1,3,5,7 etc - I want the calculation in such a way that first 50% sum will show marks obtained like this: For example a student appeared in 3 exams, so 50% exams shall be 1.5 exams - so the sum of first 50% should be his first exam marks + the 50% of the marks obtained by him in the 2nd or middle or tie breaker exam. And the remaining 50% exam marsk shall be: the 50% of the marks obtain in the 2nd exam + the marks obtained in the 3rd exam. Based on above data, Moeed appeared in 3 exams, and his marks were 20, 65 and 34. So his first 50% marks shall be 20 + 65/2 = 32.5 => 52.5 total marks. And his 2nd 50% marks shall be 65/2 = 32.5 + 34 = 66.5 total marks
    I hope I've been able to clear my requiment.
    I will appreciate the shortest and simplest possible query to achieve since I've a large data and then I also need to take average of first 50% sum marks divided by 50% of the exams.
    Thanks in advance.
    regards
    Hamza
    Edited by: Hamza on May 25, 2011 12:46 AM

    TRy this
    /* Formatted on 2011/05/24 16:23 (Formatter Plus v4.8.8) */
    SELECT student_name, section_name, marks,
           SUM (marks) OVER (PARTITION BY student_name, section_name) sum_marks,
           CASE
              WHEN exam_id = 1
                 THEN   marks
                      +   LEAD (marks, 1, 0) OVER (PARTITION BY student_name, section_name ORDER BY exam_id)
                        / 2
              WHEN exam_id = max_id_exam
                 THEN   marks
                      +   LAG (marks, 1, 0) OVER (PARTITION BY student_name, section_name ORDER BY exam_id)
                        / 2
              ELSE marks
           END res
      FROM (SELECT student_name, section_name, exam_id, marks,
                   MAX (exam_id) OVER (PARTITION BY student_name, section_name)
                                                                      max_id_exam
              FROM eresults)
    STUDENT_NAME         SECT      MARKS  SUM_MARKS        RES
    MOEED                A            20        119       52.5
    MOEED                A            65        119         65
    MOEED                A            34        119       66.5
    SAM                  A            24        167         26
    SAM                  A             4        167          4
    SAM                  A            40        167         40
    SAM                  A            99        167        119
    SARAH                A            30        173         80
    SARAH                A           100        173        100
    SARAH                A            10        173         10
    SARAH                A            33        173         38
    11 rows selected.Edited by: Salim Chelabi on 2011-05-24 13:23

Maybe you are looking for

  • Logical and physical info objects

    hi, whats mean by logical info objects and physical info objects? whats their difference? in what way they r helping SAP HR? regards, vijay

  • For Log File In Interface

    I am doing coding part for Interface outbound from SAP to payroll systems(excel file). how to handle the errors? each time the interface run ,a lod file should be produced.how to do this? what function module i should use???

  • Can I color-code file types?

    I'm a Mac newbie. I carried over some Windows files I have been working on for years. They were made by different versions of a layout program (PageMaker 6.5 -> PageMaker 7.0 -> InDesign CS5.5), and so have different file extensions. I see how to col

  • Please help me in KeyTyped Event in Swing

    hi, goodmorning In my project I have a Frame.on that Frame I put a JDesktopPane which contains one JInternalFrame.I wrote coding in KeyTyped event and mouse clicked event of all i,e in my JFrame,JDeskotpPane and JInternalFrame. No problem in all my m

  • Please add LED turn OFF option for DL2100

    If there is an option for LED turn off on EX2, why can't it be on DL2100, since it's basically the same OS ?Please add this option on this device, thank you !