Sysdate changes when number of rows selected are huge

My requirement is that same date and time should be selected for all the rows returned by the query.
Eg: Select empno, ename , sysdate from Emp
If the query runs for more than a second, then the second component of SYSDATE will be different.
What I want is that the query firing time should be selected for all the rows returned by the query.
I hope there should be a way in Oracle to do this

Have you actually seen this happen?
On testing in Oracle 8.1.7i environment with a query
select col1, col2, to_char(sysdate,'hh24:mi:ss')
from big_table;
which returned approx 3m rows and executed for over 8 minutes the sysdate value was the same for the first row selected and the last row selected, and was the time at the start of the query.
Kevin is correct that Oracle gets the the value of Sysdate once when the query is executed and uses that value until the time that a new query is parsed.
HTH
Dave

Similar Messages

  • Is it possible to change the number of rows to be displayed in adf query ?

    Hello,
    is it possible to change the number of rows that are displayed in an adf query similar to an adf form ?
    I need to display approx 5 rows per column instead of displaying all the fields in a single column ? Thanks.

    Thanks , how do you add in the code ,is it something like follows :
    <af:query id="qryId1" headerText="Search" disclosed="true"
                                value="#{bindings.ImplicitViewCriteriaQuery.queryDescriptor}"
                                model="#{bindings.ImplicitViewCriteriaQuery.queryModel}"
                                queryListener="#{bindings.ImplicitViewCriteriaQuery.processQuery}"
                                queryOperationListener="#{bindings.ImplicitViewCriteriaQuery.processQueryOperation}">
                        <af:inputText value="#{bindings.PrtDesc.inputValue}" label="Desc"
                                      required="#{bindings.PrtDesc.hints.mandatory}"
                                      columns="#{bindings.PrtDesc.hints.displayWidth}"
                                      maximumLength="#{bindings.PrtDesc.hints.precision}"
                                      shortDesc="#{bindings.PrtDesc.hints.tooltip}" id="it3">
                          <f:validator binding="#{bindings.PrtDesc.validator}"/>
                        </af:inputText>
                      <af:column>
                       <af:outputtext/>
                        <af:outputtext/>
                     </af:column>
                      </af:query>

  • Is it possible to change the number of rows while printing a contact sheet in Iphoto? Please help

    Hi guys, I am struggling to find out how to change the number of rows on a contact sheet on Iphoto , i have selected my photos and i want it to print 6 photos on each page however I am not able to do it.      Please help me out, im a Art student and i need to submit my contact sheets for an assignment  Thanks in advance guys !!!!!

    I don't think you can do that with the Contact Sheet layout.  If you have Pages or a 3rd party image editor that supports layers you can do what you want.  Or try the demo version of OmniGraffle for Mac It will run fully operational for 14 days. 

  • I am having a problem changing a color in a selected area. Using the Quick Selection tool I am able to select the area I wish to change. Using the Brush tool, color, color mode and click drag in my selected area, nothing happens, no color changes.   I hav

    I am having a problem changing a color in a selected area. Using the Quick Selection tool I am able to select the area I wish to change. Using the Brush tool, color, color mode and click drag in my selected area, nothing happens, no color changes. I have viewed some videos and read numerous articles but haven't found the one to help me. Please point me in the best direction. Thank you Vincent TC

    For the sake of clarity and to save people time, Todd is asking about the behaviour of the Patch tool when using it to repair the area next to the young lad's head.  Todd gets a blurred dark tone pretty much regardless of the options he uses.
    IMO that's what I would expect to happen because of the close proximity of the other image elements i.e. the lad's neck and the strong lines of his shirt.  I would not choose to use the Patch tool in this situation.  Content Aware Fill makes a better stab at it. 

  • When I print a selected area of web page, it doesn't fit to the paper. The end of each page are cut off. Is there any solution?

    When I print a selected area of web page, it doesn't fit to the paper. The end of each page are cut off.
    I'm very sure my printer is set cirrectly.
    Can't Firefox shrink to fit when I want to print a selected area of web pages?
    This has never occurred in IE.

    File >Page Setup -- check your margins, I have set size to 85% which is probably left over from some problem. Also check your printer that it is correctly set to the size of the paper.

  • Number of rows fetch are not same

    Hello all,
    i am new to sql/plsql
    Oracle version 11R2
    OS RHL 5.0
    i am trying to delete all the rows from parent table as well as from child tables based on some date criteria.
    the parent table BE_STATUS contains one column OOC_DT. based on the OOC_DT i am fetching rows from Parent Table BE_STATUS.
    other child tables DO NOT have OOCDT column but are having BENO and BEDT WHICH are also in PARENT TABLE BESTATUS.
    So i am fetching all be_no,*be_dt* from BE_STATUS based on the column OOC_DT as below
    select distinct(count(*)) from be_status where ooc_dt between '31-mar-10' AND '24-dec-10';
    (COUNT(*))
    65074 and i am creating a temp table based on the above query as
    create table temp as select be_no, be_dt from be_status where ooc_dt between '31-mar-10' AND '24-dec-10';
    table created.and then i am counting the number of rows in temp table
    select distinct(count(*)) from temp;
    (COUNT(*))
    65074 so there are around 51 child tables which are having the column BE_NO AND BE_DT.
    so the total no of rows in temp should be equal to total of all rows in each and every column based on the criteria above.
    that is
    select distinct(count(*)) from be_penal  where (be_no,be_dt) in (select be_no,be_dt from temp);
    (COUNT(*))
            64
    select distinct(count(*)) from be_fine  where (be_no,be_dt) in (select be_no,be_dt from temp);
    (COUNT(*))
            62
    select distinct(count(*)) from be_cash_lic  where (be_no,be_dt) in (select be_no,be_dt from temp);
    (COUNT(*))
            23
    select distinct(count(*)) from c_cl_be  where (be_no,be_dt) in (select be_no,be_dt from temp);
    (COUNT(*))
             2
    select distinct(count(*)) from chex where (be_no,be_dt) in (select be_no,be_dt from temp);
    (COUNT(*))
             0
    select distinct(count(*)) from amend_q where (be_no,be_dt) in (select be_no,be_dt from temp);
    (COUNT(*))
             0
    select distinct(count(*)) from be_perm  where (be_no,be_dt) in (select be_no,be_dt from temp);
    (COUNT(*))
           889
    select distinct(count(*)) from exam_instr where (be_no,be_dt) in (select be_no,be_dt from temp);
    (COUNT(*))
           690
    select distinct(count(*)) from c_rms_mesg  where (be_no,be_dt) in (select be_no,be_dt from temp);
    (COUNT(*))
         64982
    select distinct(count(*)) from item_duty_fg  where (be_no,be_dt) in (select be_no,be_dt from temp);
    (COUNT(*))
        398129
    select distinct(count(*)) from a_item_det  where (be_no,be_dt) in (select be_no,be_dt from temp);
    (COUNT(*))
         31453
    select distinct(count(*)) from item_det  where (be_no,be_dt) in (select be_no,be_dt FROM temp);
    (COUNT(*))
        622271 so as u can see that TEMP TABLE contains only *65074* . so the sum of the counts of all the above tables should be *65074* but alone item_det contains
    *622271* rows.
    am i making any mistake in counting the records individually??
    waiting for your usefull reply
    thanks and regards

    Not quite sure I follow your issue, but one glaringly obvious fault in your coding...
    between '31-mar-10' AND '24-dec-10';dates should be treated as dates, not strings, and we left 2 digit years from programming standards waaay back in the 1990's when everyone fixed such issues as part of the millenium bug fixes.
    between to_date('31-mar-2010','DD-MON-YYYY') AND to_date('24-dec-2010','DD-MON-YYYY');

  • Open new Excel sheet when number of rows is too big

    Hi again,
    I'm using ActiveX to write some data to Excel. It is common that the amount of data that I want to write to Excel takes more than the 65536 rows of a sheet, so every time this number of rows is reached I wanted to open a new sheet and write data to it and so one. The writting part is alrigth (I adapted the Write Table to XL.vi), I can see the row current row number I am writting data to and I now how to open the new sheet and write to it. The problem is that I don't seem to find a way to open the new sheet only once after the row nº is greater than 65536...  I don't know where to test the row number...I join my code if you have some time to look at it, any suggestion would be of great help.
    I hope you understand my problem...
    Best regards,
    Isabel

    Here is the change that I suggested.  I use the modulus for simplicity to wrap the 65535 back to 0.  A new sheet is added only when the row and column indexes are both at 0.  The shift registers are used to hold the current value of the Sheet reference.
    I also correct several bugs in your code with comments on why.
    The nested for loops used is the Example code is only suitable for a small amount of data.  The proper way to transfer a large array to Excel is with a Block Write.  Your data array would need to be broken into worksheet-sized chunks and written with a single Range->Value write using the double indexed data.
    Michael Munroe, ABCDEF
    Certified LabVIEW Developer, MCP
    Find and fix bad VI Properties with Property Inspector
    Attachments:
    Write Table & Header to Excel large import_mod.vi ‏92 KB

  • To determine the number of rows selected in a table view (BSP)

    Hi,
    My requirement is:
    I would be selecting 1 row from a table view ( which is made multiselect for another requirement) , and press a button.
    The functionality of button is to open a popup window based on the row selected.
    I want to display an error message if more than 1 row is selected, and button is clicked.
    Message will say that "you cannot select more than 1 row".
    For this,  I need to know how I can get the number of selected rows in a table view.
    I tried using the below code.
    But I feel this will work only in DO_HANDLE_DATA method.
    The popup would open, even before control comes in this method.
      CALL METHOD cl_hrrcf_iterator=>get_tv_index
        EXPORTING
          p_id               = p_tableview_id
          pt_form_fields = table_form_fields
        IMPORTING
          pt_indices      = sel_row_index_tab.
    Could you please provide me with a solution.
    Quick replies will be highly appreciated.
    Thanks,
    Nisha Vengal.

    Hi ,
    Your TV :
    <htmlb:tableView id              = "tv1l"
                                   design          = "alternating"
                                   visibleRowCount = "10"
                                   fillUpEmptyRows = "true"
                               onRowSelection  = "MyEventRowSelection" <----This is the event you have to use
                                   selectionMode   = "MULTILINEEDIT"
                                  filter          = "SERVER"
                                   table           = "<%= some table %>" >
    in DO_REQUEST:
    DATA:  tv                  TYPE REF TO cl_htmlb_tableview,
           tv_event          TYPE REF TO cl_htmlb_event_tableview ,
           event             TYPE REF TO if_htmlb_data.
    event = cl_htmlb_manager=>get_event( request ).
    IF event IS NOT INITIAL AND event->event_name = htmlb_events=>tableview.
      tv_event ?= event.
      CASE event->event_server_name.
        WHEN 'MyEventRowSelection'.
    count = count + 1 .
    if count ne 1 .
    errmsg = 'Your message'.
    endif.
    ENDCASE.
    ENDIF.
    in View/Layout:
    <% if errmsg is not initial. %>
    <s cript t y p e   =   t e x t / j a v a s c r i p t >
    a l e r t ("<%= errmsg %>") .
    </ s c r i p t>
    <% clear errmsg. %>
    <% endif. %>
    errmsg is a class attribute of type string and count is also a class attribute of type c .
    Regards,
    Anubhav.
    Reward if useful
    Edited by: Anubhav Jain on Sep 19, 2008 3:08 PM

  • How do you change the number of rows returned by an advanced datagrid...Only displays 1000 rows....I

    I am using coldfusion to query an oracle table....Query returns approximately 2000 rows, however the max rows the datagrid will display is 1000.  Does anybody know how to change this...THANKS!!

    Thanks so much for your answer that sounds like a good idea...
    I found the answer to my initial problem...In my coldfusion I had set maxrows = 1000.  So the datagrid was always returning 1000 records even when a lot more than that should have been returned...When I removed the maxrows parameter in the coldfusion code, my datagrid was now been populated with the correct number of rows...
    thanks again for your help,
    Ronnie Raigrodski (Aka -- FlexNerd)

  • Can u find (number of rows) + (SELECT * FROM emp) in 1 query?

    We have a requirement like this: We need to pass a SQL statement as a SYS_REFCURSOR OUT variable from a SP. Problem is, if the SQL returned 0 rows we have to send 1 row with all NULLS to the SYS_REFCURSOR.
    Is there any way to find out the number of rows returned from a SQL without having to put a SELECT COUNT(*) again using the "same" SQL?

    Peter:
    That only works if the cursor actually returns rows. Consider:
    SQL> create table t as
      2  select rownum id, to_char(to_date(rownum, 'J'), 'Jsp') descr
      3  from user_objects
      4  where rownum <= 5;
    Table created.
    SQL> insert into t select * from t;
    5 rows created.
    SQL> commit;
    Commit complete.
    SQL> create function f (p_id in number) return sys_refcursor as
      2     l_cur sys_refcursor;
      3  begin
      4     open l_cur for
      5        select id, descr, count(*) over() cnt
      6        from t
      7        where id = p_id;
      8     return l_cur;
      9  end;
    10  /
    Function created.
    SQL> var cur refcursor
    SQL> exec :cur := f(1);
    PL/SQL procedure successfully completed.
    SQL> print cur
            ID DESCR             CNT
             1 One                 2
             1 One                 2
    SQL> exec :cur := f(42);
    PL/SQL procedure successfully completed.
    SQL> print cur
    no rows selectedSince the OP's requirement (or ""solution" coming from someone who misunderstood the concept of cursors") is that "if the SQL returned 0 rows we have to send 1 row with all NULLS to the SYS_REFCURSOR" the analytic count doesn't help.
    @OP
    The only reliable (for certain definitions of reliable) way would be to consume the first row of the cursor to see if it did in fact return any rows.
    However, if the cursor was initally empty, we then need to generate a new cursor with all NULLS to satisfy the request. Not a big deal, as the new cursor would reflect the state of the database at the time of the initial query, even if a qualifying row was inserted and committed between the first query and the second, but it doesn't work the other way around.
    If I consume the first row and find a record, then I need to re-do the query to get all of the rows. but what happens if another process changes/deletes the qualifying row in between and commits? The second query will have no rows and you will return an empty cursor to the caller.
    Also, counting the rows (which the analytic count will need to do) could have a significant impact on performance since all the qualifying rows need to be read before the first row can be returned.
    John

  • How to control the number of rows selected from a sybase database table?

    Hi, JDBC guru,
    I'm working on project using Sybase 11.9.x database.We need to process a record in a table,first select it from the table,then do some computing,finally write it to a dbf file, if the above steps succeed,remove the original row in the table.Quite evidently, all these operation should be put into one transaction. But how can I select just a number of rows from the sybase database table?
    Any hints?
    Thank you in advance.
    Regards,
    Jusitne

    Statement stmt...
    stmt.setMaxRows(20);

  • Report Script - How to get the total on the any number of rows selected

    Hi,<BR>I am using Essase and report script for the reporting purpose. In this i would like to know how to get the sum of all the rows selected. I know we can use the calculate row, but it has to be done with print row to display the newly created row. But i am using alphablox where this print row is not working. Is there any other alternative is there to get the sum of any number of rows, and displaying them??<BR>Please help me.<BR><BR>Regards<BR>R.Prasanna

    Pls check the structure and index.
    EMP_ID NUMBER(9) NOT NULL,
    EMP_CD           NUMBER(3),
    EMP_NO VARCHAR2(250 BYTE) NOT NULL,
    FROM_EFF_DT DATE NOT NULL,
    TO_EFF_DT DATE,
    CREATE INDEX IDX_EMP_NO ON EMP
    (EMP_NO)
    NOLOGGING
    TABLESPACE INDEXES
    PCTFREE 20
    INITRANS 10
    MAXTRANS 255
    STORAGE (
    INITIAL 56K
    NEXT 1784K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    FREELISTS 4
    FREELIST GROUPS 1
    BUFFER_POOL DEFAULT
    NOPARALLEL;

  • Changing Maximum Number of Rows Per Page to Include

    I am trying to change the "Maximum Number of Rows Per Page to Include" using Enterprise Manager > Coreapplication > Capacity Management > Performance.
    It was default to 75. I need to change it to around 5,000. I have a report which generates 5,000 records and I use Agent to send it to our user at a scheduled time.
    I change 75 to 5000, activate the changes and restart the BI. After restarting it automatically reverts back to 75.
    Has anyone experienced this?
    My instanceconfig has contains this:
    <Views>
    <Pivot>
    <!--This Configuration setting is managed by Oracle Enterprise Manager Fusion Middleware Control-->
    <DefaultRowsDisplayedInDelivery>75</DefaultRowsDisplayedInDelivery>
    <!--This Configuration setting is managed by Oracle Enterprise Manager Fusion Middleware Control-->
    <DefaultRowsDisplayedInDownload>5000000</DefaultRowsDisplayedInDownload>
    <!--This Configuration setting is managed by Oracle Enterprise Manager Fusion Middleware Control-->
    <DisableAutoPreview>false</DisableAutoPreview>
    <MaxCells>1920000</MaxCells>
    <MaxVisiblePages>2500</MaxVisiblePages>
    <MaxVisibleRows>1000000</MaxVisibleRows>
    <MaxVisibleSections>5000</MaxVisibleSections>
    </Pivot>
    <Table>
    <!--This Configuration setting is managed by Oracle Enterprise Manager Fusion Middleware Control-->
    <DefaultRowsDisplayedInDelivery>75</DefaultRowsDisplayedInDelivery>
    <!--This Configuration setting is managed by Oracle Enterprise Manager Fusion Middleware Control-->
    <DefaultRowsDisplayedInDownload>5000000</DefaultRowsDisplayedInDownload>
    <MaxCells>1920000</MaxCells>
    <MaxVisiblePages>2500</MaxVisiblePages>
    <MaxVisibleRows>1000000</MaxVisibleRows>
    <MaxVisibleSections>2000000</MaxVisibleSections>
    </Table>
    </Views>
    Any help would be greatly appreciated.
    Thanks!

    Hi,
    Editing in EM should change the settings. Stop all the services and restart
    In the individual reports for tables and pivot tables >> Edit the table properties and add the number of 'Rows Per Page'
    Hope this helped/ answered
    Regards
    MuRam

  • How to change Default number of rows displayed in a Briefing Book

    Hi,
    We have a requirement to deliver a dashboard containing 7 dashboard pages to the business users.
    To achieve this, I have created a briefing book by adding all the required dahboard pages and scheduled an agent to deliver the briefing book in PDF format. However, the briefing book delivered by the agent shows only 25 rows for all the analysis (reports) included in the dashboard pages.
    I have already made the following settings:
    1. At the report level, edited the table view property to show 150 Rows Per page.
    2. At the dashboard page level, edited the PDF and Print properties to Print All Rows.
    3. Edited the instanceconfig.xml file to include the following tag under <Table> tag: <DefaultRowsDisplayedInDelivery>15000</DefaultRowsDisplayedInDelivery>
    Please advise if there is any setting which can help in increasing the default number of rows in a Briefing Book (OBIEE 11.1.1.3).
    Thanks & Regards,
    Sumit

    Hi,
    This is a bug in 11.1.1.3
    Bug 12671370 - BRIEFING BOOKS DO NOT SHOW ALL ROWS
    As a workaround, you may want to click on the "Display Maximum(500) rows per page" button on the dashboard page before you download to Briefing books.This will work for reports with less than 500 rows.
    Rgds,
    Dpka

  • How to change the number displaying rows in a table

    Hi all,
    i have a table for resources in Debrief Work order (Standard Screen), we need to change the default displaying rows. inistially it displayed 3 empty rows.
    i tried to change the Records Displayed for the table but it did not affect.
    also it is possible to change the "Add 3 rows" button in the table to add for example 5 rows instead?
    any idea?
    Regards,
    Mahdi Charara

    Hi,
    Through personalization we can do.On standared page top right u will find personalization link.click on the clink next expand all there find apporiate table .Here u will fine reorder button set as u want display and save. then u can see the change.For add row functionality u need to extend the co.

Maybe you are looking for

  • Outbound Delivery View

    Hi,   When i look at the standard delivery note print program.  I found there are number of structure:   VBCO3,                         "Communicationarea for view    VBDKL,                         "Headerview    VBDPL,                         "Itemv

  • My ITunes won't connect to themusic store anymore!! Please help me!

    When I try to connect to the music store I keep getting this message that I says that it can't connect and that I should check ny network connections and try again. I am using ITunes 4 with Windows XP Home Edition, Service Pack 2. I have tried Everyt

  • Error 1418 for Fifth Gen. iPod

    I got a new 80GB iPod Video and downloaded iTunes 7. When I connect the ipod, itunes takes a long time to add it into the frame. Then it attempts to update it. I receive error from xp that says all data lost in transfer and then itunes error 1418 com

  • Record count is more in the Fact tables when compared to Cube data!

    When i delete request from my cube it is not getting deleted from the fact table. Cube shows around 3.5 million records but when I checked in the fact table it was showing more than 11 million records.

  • Printer not working with Leopard and Airport Express

    Hello! I have seen that this is a common problem but I've tried several solutions that seemed to work for others but still not for me. I have a Macbook Pro unibody and airport express with OS X 10.5.6. I used a Samsung CLP-300 wirelessly though my ai