View results in more ROW then Select.

Hello,
I am trying to create a view and for some reason when I just run the select statement of that view, i get 11 rows. But when i create the view, i get 106 rows.
I am really stomped and need to know what's causing this.
-----------------------------When i execute this view, i get 106 rows -----------------------
CREATE OR REPLACE VIEW REGRPT_CONS_SPECIAL_FEE_VIEW
(REG_CONFERENCE_ID, COMPANY, CONF_REFERENCE_CODE, CONF_DESCRIPTION, REG_SESSION_ID,
SESS_REFERENCE_CODE, BEGIN_DATE, END_DATE, SESS_DESCRIPTION, CONSULTANT_ID,
SPECIAL_FEE_AMOUNT, REASON, REGISTERED)
AS
SELECT DISTINCT RCC.REG_CONFERENCE_ID
     , RCC.COMPANY
     , RC.REFERENCE_CODE
     , RCT.DESCRIPTION
     , RS.ID
     , RS.REFERENCE_CODE
     , RS.BEGIN_DATE
     , RS.END_DATE
     , RST.non_html_DESCRIPTION
     , rsf.consultant_no
     , rsf.fee_amount
     , rsf.reason
     , 'Y'
FROM reg_conference_company@webtst rcc
     , reg_conference@webtst rc
     , reg_conference_type@webtst rct
     , reg_session@webtst rs
     , reg_session_t@webtst rst
     , locale@webtst l
     , reg_special_fee@webtst rsf
     , reg_consultant@webtst rcons
WHERE rcc.reg_conference_id = rc.ID
AND rc.reg_conference_type_id = rct.ID
AND RC.ID = RS.REG_CONFERENCE_ID
AND rs.ID = rst.reg_session_id
AND rst.locale_id = l.ID
AND l.language_id = '1'
AND L.COMPANY = RCC.COMPANY
AND rc.ID = rsf.reg_conference_id
AND rcc.company = rsf.company
AND rs.ID = rcons.reg_session_id
AND rsf.company = rcons.company
AND rsf.consultant_no = rcons.consultant_no
AND rcons.status <> 'C'
UNION
--- consultants not registered and in special fee
SELECT DISTINCT RCC.REG_CONFERENCE_ID
     , RCC.COMPANY
     , RC.REFERENCE_CODE
     , RCT.DESCRIPTION
     , RS.ID
     , RS.REFERENCE_CODE
     , RS.BEGIN_DATE
     , RS.END_DATE
     , RST.non_html_DESCRIPTION
     , rsf.consultant_no
     , rsf.fee_amount
     , rsf.reason
     , 'N'
FROM reg_conference_company@webtst rcc
, reg_conference@webtst rc
, reg_conference_type@webtst rct
, reg_session@webtst rs
, reg_session_t@webtst rst
, locale@webtst l
, reg_special_fee@webtst rsf
WHERE rcc.reg_conference_id = rc.ID
AND rc.reg_conference_type_id = rct.ID
AND RC.ID = RS.REG_CONFERENCE_ID
AND rs.ID = rst.reg_session_id
AND rst.locale_id = l.ID
AND l.language_id = '1'
AND L.COMPANY = RCC.COMPANY
AND rc.ID = rsf.reg_conference_id
AND rcc.company = rsf.company
AND (rsf.company || rsf.consultant_no) NOT IN
                              (SELECT (company ||consultant_no)
                              FROM reg_consultant@webtst
                              WHERE status <> 'C'
                              AND reg_session_id = rs.ID)
--------------When i run this select i get 11 rows ----------------------------
SELECT DISTINCT RCC.REG_CONFERENCE_ID
     , RCC.COMPANY
     , RC.REFERENCE_CODE
     , RCT.DESCRIPTION
     , RS.ID
     , RS.REFERENCE_CODE
     , RS.BEGIN_DATE
     , RS.END_DATE
     , RST.non_html_DESCRIPTION
     , rsf.consultant_no
     , rsf.fee_amount
     , rsf.reason
     , 'Y'
FROM reg_conference_company@webtst rcc
     , reg_conference@webtst rc
     , reg_conference_type@webtst rct
     , reg_session@webtst rs
     , reg_session_t@webtst rst
     , locale@webtst l
     , reg_special_fee@webtst rsf
     , reg_consultant@webtst rcons
WHERE rcc.reg_conference_id = rc.ID
AND rc.reg_conference_type_id = rct.ID
AND RC.ID = RS.REG_CONFERENCE_ID
AND rs.ID = rst.reg_session_id
AND rst.locale_id = l.ID
AND l.language_id = '1'
AND L.COMPANY = RCC.COMPANY
AND rc.ID = rsf.reg_conference_id
AND rcc.company = rsf.company
AND rs.ID = rcons.reg_session_id
AND rsf.company = rcons.company
AND rsf.consultant_no = rcons.consultant_no
AND rcons.status <> 'C'
UNION
--- consultants not registered and in special fee
SELECT DISTINCT RCC.REG_CONFERENCE_ID
     , RCC.COMPANY
     , RC.REFERENCE_CODE
     , RCT.DESCRIPTION
     , RS.ID
     , RS.REFERENCE_CODE
     , RS.BEGIN_DATE
     , RS.END_DATE
     , RST.non_html_DESCRIPTION
     , rsf.consultant_no
     , rsf.fee_amount
     , rsf.reason
     , 'N'
FROM reg_conference_company@webtst rcc
, reg_conference@webtst rc
, reg_conference_type@webtst rct
, reg_session@webtst rs
, reg_session_t@webtst rst
, locale@webtst l
, reg_special_fee@webtst rsf
WHERE rcc.reg_conference_id = rc.ID
AND rc.reg_conference_type_id = rct.ID
AND RC.ID = RS.REG_CONFERENCE_ID
AND rs.ID = rst.reg_session_id
AND rst.locale_id = l.ID
AND l.language_id = '1'
AND L.COMPANY = RCC.COMPANY
AND rc.ID = rsf.reg_conference_id
AND rcc.company = rsf.company
AND (rsf.company || rsf.consultant_no) NOT IN
                              (SELECT (company ||consultant_no)
                              FROM reg_consultant@webtst
                              WHERE status <> 'C'
                              AND reg_session_id = rs.ID)

I don't know the reason, but here is what I would do to narrow the search for it.
Remove all DISTINCT operators and replace UNION with UNION ALL. Compare the result (number of rows) for the select and for the View.
If it is the same, then you have some problem with duplicate values. If not you have two different selects (compare execution plan too) or different data (does it run in the same schema?).
Then add step by step a DISTINCT and check how the result changes. Start analyzing only this part of the query.

Similar Messages

  • Sender JDBC adapter SELECT / UPDATE issue - updates more rows than selected

    Hi,
    We have configured a Sender JDBC Adapter to poll records from an Oracle table based on a flag field and then update the flag for the selected records. When tested in DEV and QA environments (where test data comes in intermittently and not in huge volumes), itu2019s working fine.
    Both SELECT and UPDATE queries written in the Sender JDBC adapter are getting properly executed and are changing the status of the flag for the selected records from Y to N once read from the database.
    select * from <table> where flag = 'N'.
    update <table> set flag = 'Y' where flag = 'N'.
    But in the PROD environment (with records getting updated in the database every second), after XI executes the SELECT query and just before the UPDATE query is executed, new records come into the Oracle table with status flag 'N". So when the UPDATE query runs just after the SELECT query, then these unselected records also get updated to 'Y'. Thus these records never get into the resultset and hence XI and thus remain unprocessed.
    So when XI does a SELECT and UPDATE on the Oracle DB table and concurrently there is an INSERT happening into the table from the other end, the JDBC sender adapter is picking up a certain number of records but updating the status of more records than it picked up.
    So how does XI deal with such a common scenario without dropping records?
    Thanks,
    Vishak

    The condition being checked is the same for both SELECT and UPDATE statements.
    Initially I tried setting transaction isolation levels on the database to repeatable_read and serializable but it was throwing me a java.sql.SQLException error saying that these transaction levels were not valid.
    I asked for these transaction level permissions for the XI user from my DBA but the DB I am accessing provides only a view into other databases and so it's not possible.

  • How to spool data into multiple Excel sheet if result is more then 65k rows

    Hi all,
    Wann spool data into multiple excel sheet bocz my resultant no of rows are more then 65k.
    Thanks to all in advance.....

    many choices
    1) migrate to a newer version of Excel
    2) split the files after spooling
    for instance with split
    split -l65000 file.txtor with perl, java, vb or what-so-ever
    3) do more than one report by using rownum
    spool f1
    select empno,ename  from (select rownum r,empno,ename from emp order by empno) where r<6 ;
    spool off
    spool f2
    select empno,ename  from (select * from (select rownum r,empno,ename from emp order by empno) where r<11) where r>5 ;
    spool off
    spool f3
    select empno,ename  from (select rownum r,empno,ename from emp order by empno) where r>10 ;
    spool off

  • Query results window limited to 100 rows then 150 then 200

    Great product - I love this tool and don't mind helping to find the bugs in the prereleases like this.
    When I
    SELECT * FROM MY_TABLE
    in a sql worksheet, the results window initially only displays the first 100 rows.
    I can try to scroll down, but it stops at 100 rows.
    If click on Script Output window, the fetch count goes up to 150 and if I click back into
    Results window, I can then scroll to row 150. Click back over to Script Output and come back, now I'm up to 200. As long I scroll to the bottom of the Results window and click back and forth, I can increase the size of the results window by 50 rows each time. If I want the result window to show 2000 rows this will get real tedious real quick...
    Maybe a bug in dynamically resizing the result set?

    Hi gary,
    You may have already seen one or more threads like the following on the issue of increased memory overhead for the Excel formats:
    Re: Sql Developer 3.1 - Exporting a result set in xls generates and empty file
    Basically SQL Developer uses a third-party API to read and write these Excel formats. There are distinct readers and formatters for each of the xls and xlsx forms.
    There is a newer version of the API that supports streaming of xlsx Workbooks. Basically it achieves a much lower footprint by keeping in memory only rows that are within a sliding window, while the older, non-streaming version gives access to all rows in the document. The programmer may define the size of this window. I believe the newer API version was either not available or not stable during our 3.1 development cycle. Possibly a future SQL Developer version might use it.
    Regards,
    Gary
    SQL Developer Team

  • How do I create a 1d array that takes a single calculation and insert the result into the first row and then the next calculation the next time the loop passes that point and puts the results in thsecond row and so on until the loop is exited.

    The attached file is work inprogress, with some dummy data sp that I can test it out without having to connect to equipment.
    The second tab is the one that I am having the problem with. the output array from the replace element appears to be starting at the index position of 1 rather than 0 but that is ok it is still show that the new data is placed in incrementing element locations. However the main array that I am trying to build that is suppose to take each new calculation and place it in the next index(row) does not ap
    pear to be working or at least I am not getting any indication on the inidcator.
    Basically what I am attempting to do is is gather some pulses from adevice for a minute, place the results for a calculation, so that it displays then do the same again the next minute, but put these result in the next row and so on until the specifiied time has expired and the loop exits. I need to have all results displayed and keep building the array(display until, the end of the test)Eventually I will have to include a min max section that displays the min and max values calculated, but that should be easy with the min max function.Actually I thought this should have been easy but, I gues I can not see the forest through the trees. Can any one help to slear this up for me.
    Attachments:
    regulation_tester_7_loops.vi ‏244 KB

    I didn't really have time to dig in and understand your program in depth,
    but I have a few tips for you that might things a bit easier:
    - You use local variables excessively which really complicates things. Try
    not to use them and it will make your life easier.
    - If you flowchart the design (very similar to a dataflow diagram, keep in
    mind!) you want to gather data, calculate a value from that data, store the
    calculation in an array, and loop while the time is in a certain range. So
    theres really not much need for a sequence as long as you get rid of the
    local variables (sequences also complicate things)
    - You loop again if timepassed+1 is still less than some constant. Rather
    than messing with locals it seems so much easier to use a shiftregister (if
    absolutely necessary) or in this case base it upon the number of iterations
    of the loop. In this case it looks like "time passed" is the same thing as
    the number of loop iterations, but I didn't check closely. There's an i
    terminal in your whileloop to read for the number of iterations.
    - After having simplified your design by eliminating unnecessary sequence
    and local variables, you should be able to draw out the labview diagram.
    Don't try to use the "insert into array" vis since theres no need. Each
    iteration of your loop calculates a number which goes into the next position
    of the array right? Pass your result outside the loop, and enable indexing
    on the terminal so Labview automatically generates the array for you. If
    your calculation is a function of previous data, then use a shift register
    to keep previous values around.
    I wish you luck. Post again if you have any questions. Without a more
    detailed understanding of your task at hand it's kind of hard to post actual
    code suggestions for you.
    -joey
    "nelsons" wrote in message
    news:[email protected]...
    > how do I create a 1d array that takes a single calculation and insert
    > the result into the first row and then the next calculation the next
    > time the loop passes that point and puts the results in thsecond row
    > and so on until the loop is exited.
    >
    > The attached file is work inprogress, with some dummy data sp that I
    > can test it out without having to connect to equipment.
    > The second tab is the one that I am having the problem with. the
    > output array from the replace element appears to be starting at the
    > index position of 1 rather than 0 but that is ok it is still show that
    > the new data is placed in incrementing element locations. However the
    > main array that I am trying to build that is suppose to take each new
    > calculation and place it in the next index(row) does not appear to be
    > working or at least I am not getting any indication on the inidcator.
    >
    > Basically what I am attempting to do is is gather some pulses from
    > adevice for a minute, place the results for a calculation, so that it
    > displays then do the same again the next minute, but put these result
    > in the next row and so on until the specifiied time has expired and
    > the loop exits. I need to have all results displayed and keep building
    > the array(display until, the end of the test)Eventually I will have to
    > include a min max section that displays the min and max values
    > calculated, but that should be easy with the min max function.Actually
    > I thought this should have been easy but, I gues I can not see the
    > forest through the trees. Can any one help to slear this up for me.

  • Select-options in Selection Screen to show more rows for entering values

    Hi all,
    In my webdynpro abap  I have added the SELECT-OPTIONS componenet and working fine.
    User need  in the Selection Screen for select options  more rows to show entering values in single time.
    THe Default Rows show only 5 .
    user need to change to 10 or 15 Rows to show.
    Pl help .
    THanks in advance.
    Dev

    Hi,
    Here is the way which I just tested and found working.
    This is the main code which needs to be written.
    TYPES:
        ty_r_vbeln TYPE RANGE OF vbeln,
        ty_s_vbeln TYPE LINE OF ty_r_vbeln.
    data ls_vbeln type ty_s_vbeln.
    field-symbols <fs_range> TYPE INDEX TABLE.
    ASSIGN lt_range->* TO <fs_range>.
    do 10 times.
    APPEND ls_vbeln TO <fs_range>.
    enddo.
    For further refinement, you can create a input field in view for number of lines to be shown as enabled.
    The complete code is as below.
    DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
    lo_cmp_usage =   wd_this->wd_cpuse_select_options( ).
    IF lo_cmp_usage->has_active_component( ) IS INITIAL.
      lo_cmp_usage->create_component( ).
    ENDIF.
    DATA lo_interfacecontroller TYPE REF TO iwci_wdr_select_options .
    lo_interfacecontroller =   wd_this->wd_cpifc_select_options( ).
    DATA lo_r_helper_class TYPE REF TO if_wd_select_options.
    lo_r_helper_class = lo_interfacecontroller->init_selection_screen(  ).
    Creating range table
    DATA lt_range TYPE REF TO data.
    CALL METHOD lo_r_helper_class->create_range_table
        EXPORTING
          i_typename     = 'VBELN'
        RECEIVING
          rt_range_table = lt_range.
    Disabling the global options
    CALL METHOD lo_r_helper_class->set_global_options
      EXPORTING
          i_display_btn_cancel  = abap_false
          i_display_btn_check   = abap_false
          i_display_btn_reset   = abap_false
          i_display_btn_execute = abap_true.
           TYPES:
        ty_r_vbeln TYPE RANGE OF vbeln,
        ty_s_vbeln TYPE LINE OF ty_r_vbeln.
    data ls_vbeln type ty_s_vbeln.
    field-symbols <fs_range> TYPE INDEX TABLE.
    ASSIGN lt_range->* TO <fs_range>.
    do 10 times.
    APPEND ls_vbeln TO <fs_range>.
    enddo.
    Adding the selection field
    CALL METHOD lo_r_helper_class->add_selection_field
        EXPORTING
          i_id                         = 'VBELN'
          I_OBLIGATORY                 = ABAP_TRUE
          I_NO_EXTENSION               = abap_false
          i_value_help_type = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP
          it_result                    = lt_range.
    Edited by: Jayanthi Jayaraman on Dec 2, 2010 8:29 AM

  • Stop executing query once the result is more than n rows

    Hi,
    Is it possible to stop executing a query for a View Object once the result hits n rows?
    Any pointers are appreciated
    Thank you for your time.
    Edited by: user594688 on Sep 12, 2008 8:21 AM

    Rownum is indeed the attribute. If you really want to stop the query after the first n rows, that's pretty much the only way to do it, to my knowledge.
    If you're primarily worried about database load, but want to give the user the option to query more rows if and when they really need them, check out the following in the Fusion Dev Guide for Forms/4GL developers:
    37.1.5 Efficiently Scrolling Through Large Result Sets Using Range Paging
    (Note that this is not the same as simply using a range size, which ADF does by default--the range size simply limits the number of rows displayed ot the user, not the number queried. It's also not the same as setting the JDBC Fetch size, which limits the number of rows loaded into the cache, and therefore onto the app server, at one time, but again not the actual query result.)

  • Adding 2 more rows to a select without inserting rows to base table

    hello all,
    i have a below simple select statement which is querying a table.
    select * from STUDY_SCHED_INTERVAL_TEMP
    where STUDY_KEY = 1063;
    but here is the situations. As you can see its returning 7 rows. But i need to add
    2 more rows..with everything else default value or what exist... except adding 2 more rows.
    i cannot insert into base table. I want my end results to increment by 2 days in
    measurement_date_Taken to 01-apr-09....so basically measurement_date_taken should
    end at study_end_Date...
    IS THAT EVEN POSSIBLE WITHOUT INSERTING ROWS INTO THE TABLE AND JUST PLAYIHY AROUND WITH
    THE SELECT STATEMENT??
    sorry if this is confusing...i am on 10.2.0.3
    Edited by: S2K on Aug 13, 2009 2:19 PM

    Well, I'm not sure if this query looks as good as my lawn, but seems to work anyway ;)
    I've used the 'simplified version', but the principle should work for your table to, S2K.
    As Frank already pointed out (and I stumbled upon it while clunging): you just select your already existing rows and union them with the 'missing records', you calculate the number of days you're 'missing' based on the study_end_date:
    MHO%xe> alter session set nls_date_language='AMERICAN';
    Sessie is gewijzigd.
    Verstreken: 00:00:00.01
    MHO%xe> with t as ( -- generating your data here, simplified by me due to cat and lawn
      2  select 1063 study_key
      3  ,      to_date('01-MAR-09', 'dd-mon-rr') phase_start_date
      4  ,      to_date('02-MAR-09', 'dd-mon-rr') measurement_date_taken
      5  ,      to_date('01-APR-09', 'dd-mon-rr') study_end_date
      6  from dual union all
      7  select 1063, to_date('03-MAR-09', 'dd-mon-rr') , to_date('04-MAR-09', 'dd-mon-rr') , to_date('01-APR-09', 'dd-mon-rr') from dual union all
      8  select 1063, to_date('03-MAR-09', 'dd-mon-rr') , to_date('09-MAR-09', 'dd-mon-rr') , to_date('01-APR-09', 'dd-mon-rr') from dual union all
      9  select 1063, to_date('03-MAR-09', 'dd-mon-rr') , to_date('14-MAR-09', 'dd-mon-rr') , to_date('01-APR-09', 'dd-mon-rr') from dual union all
    10  select 1063, to_date('03-MAR-09', 'dd-mon-rr') , to_date('19-MAR-09', 'dd-mon-rr') , to_date('01-APR-09', 'dd-mon-rr') from dual union all
    11  select 1063, to_date('22-MAR-09', 'dd-mon-rr') , to_date('23-MAR-09', 'dd-mon-rr') , to_date('01-APR-09', 'dd-mon-rr') from dual union all
    12  select 1063, to_date('22-MAR-09', 'dd-mon-rr') , to_date('30-MAR-09', 'dd-mon-rr') , to_date('01-APR-09', 'dd-mon-rr') from dual
    13  ) -- actual query:
    14  select study_key
    15  ,      phase_start_date
    16  ,      measurement_date_taken
    17  ,      study_end_date
    18  from   t
    19  union all
    20  select study_key
    21  ,      phase_start_date
    22  ,      measurement_date_taken + level -- or rownum
    23  ,      study_end_date
    24  from ( select study_key
    25         ,      phase_start_date
    26         ,      measurement_date_taken
    27         ,      study_end_date
    28         ,      add_up
    29         from (
    30                select study_key
    31                ,      phase_start_date
    32                ,      measurement_date_taken
    33                ,      study_end_date
    34                ,      study_end_date - max(measurement_date_taken) over (partition by study_key
    35                                                                          order by measurement_date_taken ) add_up
    36                ,      lead(measurement_date_taken) over (partition by study_key
    37                                                          order by measurement_date_taken ) last_rec
    38                from   t
    39              )
    40         where last_rec is null
    41       )
    42  where rownum <= add_up
    43  connect by level <= add_up;
    STUDY_KEY PHASE_START_DATE    MEASUREMENT_DATE_TA STUDY_END_DATE
          1063 01-03-2009 00:00:00 02-03-2009 00:00:00 01-04-2009 00:00:00
          1063 03-03-2009 00:00:00 04-03-2009 00:00:00 01-04-2009 00:00:00
          1063 03-03-2009 00:00:00 09-03-2009 00:00:00 01-04-2009 00:00:00
          1063 03-03-2009 00:00:00 14-03-2009 00:00:00 01-04-2009 00:00:00
          1063 03-03-2009 00:00:00 19-03-2009 00:00:00 01-04-2009 00:00:00
          1063 22-03-2009 00:00:00 23-03-2009 00:00:00 01-04-2009 00:00:00
          1063 22-03-2009 00:00:00 30-03-2009 00:00:00 01-04-2009 00:00:00
          1063 22-03-2009 00:00:00 31-03-2009 00:00:00 01-04-2009 00:00:00
          1063 22-03-2009 00:00:00 01-04-2009 00:00:00 01-04-2009 00:00:00
    9 rijen zijn geselecteerd.If there's a simpler way (in SQL), I hope others will join and share their example/ideas/thoughts.
    I have a feeling that this is using more resources than needed.
    But I've got to cut the daisies first now, they interfere my 'lawn-green-ess' ;)

  • ALV: multiselect selects more rows than expected

    If I have table with many pages of data and do following actions:
    1) leave lead select in first page as it is
    2) go to next page - with ctrl select 2nd row
    3) go to next page - with ctrl select 1st row
    4) go back to previous page - 2nd row selected as expected
    5) go to next (3rd) page - 1st and 2nd row is selected (expected only 1st row to be selected)
    There is no any select event handler which could cause such behavior.
    I have noticed such error on standard table, too.
    What is causing this error?

    Oskars,
    If you are using
    -- one context node for this table,
    -- you have set the context node's Cardinality to o...n,
    -- and the table UI element that's bind to this context node's property SelectionMode is set to be 'auto' or 'multi',
    then I think this is a bug in your version.  I have tried on my system (SAP ECC 6.0, SAP_ABA 700), and I cannot reproduce the behavior you have describe in this thread.   Check the CSN to confirm if this is a bug indeed.
    regards,
    Tina Yang

  • How to handle Event when more that 2 rows are selected in a WD Table

    Hello WD developers,
    I need your assistance.
    My case is as following:
    I have a WD table populated with data.
    I also have several buttons in the toolbar table.
    One of those buttons should be enabled only in case that one row (and only one)
    is selected in the table otherwise it should be disable.
    The problem is that an even is triggered only when the first row is selected
    and when the second (third....) are selected no event occur.
    Do you have any idea How can I solve this issue.
    Thnaks in advance for your help.
    Regards
    Harry

    Hi,
    In the Onlead selection of table make it visible and invisble of your buttons as per your selection.
    The table have single selection and multi seletion options are availble when you defing the table you can find this options in the properties of the table.
    In onlead selection your button to be mapped with attribute WDVisble.
    And based on your selection you can visible and invisible.
    wdContext.currentContextElement.set<attribute>(WDVisble.Visble);
    and
    wdContext.currentContextElement.set<attribute>(WDVisble.NONE);
    This might helps you.
    Do you need more post your issues.
    Thanks,
    Lohi

  • Multicolumn lsitbox select 1or More rows but user cannot edit

    I would like to know if it is possible to create a multicolumn listbox that a user can select one or more rows BUT cannot edit any entries (ie. is indicator?).

    The key thing to remember about a listbox is that although it looks like a table, it's really a numeric input. The strings you see in the "table" are set via the strings[] property node--which in the case of a multicolumn listbox is a 2D array of strings.
    Use this property to set the contents of the control at runtime and you don't have to worry about a user changing it.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Performance... Why a function column in a view is executed more than once...?

    Why a function column created inside a view is executed more than once when called more than once?
    EXAMPLE:
    create or replace view aux1 as
    date_column,
    any_function(date_column) column1
    from any_table
    create or replace view aux2 as
    column1 c1,
    column1 c2,
    column1 c3
    from aux1
    select * from aux2
    It will execute 3 times the function any_function... logically the value will be the same for all columns...
    I understand why!... are 3 calls... but...
    Why not to create a "small" verification and if the function column was execute replace the second, the third... value? ... instead of execute 3, 4... times...
    tks
    Braga

    Actually, this is more than a performance issue. This is a consistency problem. If the function is NOT deterministic then you may get different values for each call which is clearly not consistent with selecting 3 copies of the same column from a row. Oracle appears to have fixed this in 9i...
    Connected to:
    Oracle8i Enterprise Edition Release 8.1.7.2.0 - Production
    With the Partitioning option
    JServer Release 8.1.7.2.0 - Production
    create view v1 as select dbms_random.value(1,100) r from dual;
    create view v2 as select r r1, r r2 from v1;
    select * from v2;
              R1           R2
              93           74
    Connected to:
    Oracle9i Enterprise Edition Release 9.0.1.3.0 - Production
    With the Partitioning option
    JServer Release 9.0.1.3.0 - Production
    create view v1 as select dbms_random.value(1,100) r from dual;
    create view v2 as select r r1, r r2 from v1;
    select * from v2;
              R1           R2
              78           78Richard

  • Advanced Search: Viewing Results Issue

    This problem seems to only be on my Microsoft Surface Pro tablets with windows 8.1.
    When doing an advanced search within a document the results box is usually very large and you can see all the hits that came back. However, on my Surface when doing a search the results box is so small that you can't even see what's showing up.
    I've tried to enlarge the search box which slightly helps but still can only see one or two results at a time and must continue to use the scroll bar to get through them.
    I was curious if there was any options within Adobe that could be changed in order to get this view changed so its more user friendly and easier to work with?
    I've been through many of the options myself but was unable to find anything that worked.
    Thanks for the help.

    As per my understanding you can crawl DL columns
    Can you get that document in search results page? Please check to see if the site which contains the library is included in content source.
    Could you please check site settings->Site Administration->Searchable columns, maybe the column is excluded?
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/b97a43b1-c727-4daa-a0d9-a18e53e09dd9/list-and-document-library-title-column-crawled-properties?forum=sharepointadminprevious
    Go to your Search Service Application in Central Administration.
        Click on Metadata Properties in the left navigation.
        Click on the Crawled Properties link.
        Click on the Categories link then select the SharePoint category
        Navigate the pages (next page arrow link) until you see ows_Title. Click on ows_Title.
        In the "Mappings to Metadata Properties" area of this page, ensure that the "Include values for this property in the search index" checkbox is checked, then Click OK. This checkbox is not checked by default.
        Repeat the same procedure above for your ows_Description crawled property to confirm that it is included in the index - which it should be by default.
        Start a Full Crawl 
    This will now include these crawled properties in the index and should now be available in the Managed Property which exposes them for Search.
    If this helped you resolve your issue, please mark it Answered

  • JDev 10 - disable command button depending on which row is selected

    I am using JDeveloper 10, and I have a table which has some data columns and a selection facet with View and Edit command buttons.
    I would like all rows to be viewable. When you click the view event it goes to another .jsp with the view action.
    It does the same thing with the edit action, however I would like to only allow rows which have an EffectiveDate column in the future to be editable.
    Is there some way to disable the edit button when those rows are selected, or to throw a validation error when the edit button is clicked for that row?
    Thanks!
    Jeff
              <af:table value="#{bindings.RateList.collectionModel}" var="row"
                          rows="#{bindings.RateList.rangeSize}"
                          first="#{bindings.RateList.rangeStart}"
                          emptyText="#{bindings.RateList.viewable ? 'No rows yet.' : 'Access Denied.'}"
                          selectionListener="#{bindings.RateList.collectionModel.makeCurrent}"
                          selectionState="#{bindings.RateList.collectionModel.selectedRow}">
                  <af:column sortProperty="RateType" sortable="false"
                             headerText="#{bindings.RateList.labels.RateType}">
                    <af:outputText value="#{row.RateDescription}"/>
                  </af:column>
                  <af:column sortProperty="EffectiveDate" sortable="false"
                             headerText="#{bindings.RateList.labels.EffectiveDate}">
                    <af:outputText value="#{row.EffectiveDate}">
                      <f:convertDateTime pattern="dd-MMM-yyyy"/>
                    </af:outputText>
                  </af:column>
                  <f:facet name="selection">
                    <af:tableSelectOne text="Select and">
                      <af:commandButton text="View" action="view">
                        <af:setActionListener from="#{row.rowKeyStr}"
                                              to="#{requestScope.requestRowKey}"/>
                      </af:commandButton>
                      <af:commandButton text="Edit"
                                        action="edit"/>
                    </af:tableSelectOne>
                  </f:facet>
                </af:table>

    So, I first tried using Chan advice, I added a new editable property from the database and then added Edit buttons to each row in the table with disabled property set to the editable property.
    This correctly displayed buttons which were editable in the correct rows.
    However, I was no longer using the select functionality which passed the rowId of the selected row to the edit page.
    I wasn't able to quickly solve this problem so I tried John's solution.
    I feel really dumb, but after about 20 rereadings it was still completely Greek to me, I have no idea what he was recommending.
    So I added onclick="return editTest()" to the Edit button.
    The I added ID to the relevant locations, and the following javascript to the page, and this is working well enough now.
    (Oh, I display the date in a slightly odd dd-MMM-yyyy format, due to slightly odd customer requirements.)
    I've probably misspelled one of the months, haven't yet finished testing.
    A couple of gotchas I found
    - Do not add onclick="editTest()" or else it will continue processing and allow all rows to be edited.
    - Putting date = document.getElementById('mainFormId:tableId:'+i+':EffectiveDateId'); would work for the original search,
    but after filtering results i and found_it are not equivalent, and date was not found in the page.
               function editTest(){
                  var found_it;
                  var date;
                  for (var i=0; i < document.getElementsByName('mainFormId:tableId:selected').length; i++)  {
                     if (document.getElementsByName('mainFormId:tableId:selected').checked) {               
    found_it = document.getElementsByName('mainFormId:tableId:selected')[i].value;
    date = document.getElementById('mainFormId:tableId:'+found_it+':EffectiveDateId');
    var result = date.innerHTML.split("-");
    var day = result[0];
    if (day.charAt(0) == '0'){
    day = day.charAt(1);
    var month;
    var monthTxt = result[1];
    switch (monthTxt) {
    case 'Jan':
    month=0;
    break;
    case 'Feb':
    month=1;
    break;
    case 'Mar':
    month=2;
    break;
    case 'Apr':
    month=3;
    break;
    case 'May':
    month=4;
    break;
    case 'Jun':
    month=5;
    break;
    case 'Jul':
    month=6;
    break;
    case 'Aug':
    month=7;
    break;
    case 'Sep':
    month=8;
    break;
    case 'Oct':
    month=9;
    break;
    case 'Nov':
    month=10;
    break;
    case 'Dec':
    month=11;
    break;
    default:
    month=11;
    break;
    var year = result[2];
    var today = new Date();
    var effDate = new Date();
    effDate.setDate(day);
    effDate.setMonth(month);
    effDate.setYear(year);
    if (effDate < today) {
    alert ('Sorry, you cannot change a rate with an effective date in the past');
    return false;
    } else {
    return true;

  • Query Results: Retrieve All Rows?

    I was looking for a feature that will allow me to choose to return "all records" to the Query Results window. The current behavior is to fetch 50 records at a time (e.g. fetch 50 records as you scroll through the results = s-l-o-w). What I'd like to do is "Retrieve All Rows" then use to the scroll bar to "smoothly" scroll to the last record. For example, the 8.0.6 version of Query Builder had this functionality and in SQL Developer 3.0, if I right-click on the results. I can choose to "Count Rows...", seems like this would be a perfect place to put a "Retrieve All Rows" option.

    Hi,
    My advice: do something only if there is a business case for it; satisfying your curiosity can get surprisingly expensive.
    You have already read about using Run Statement to execute a SQL statement, then Ctrl-End to auto-scroll to the end. You can try the same for Run Script, but first you will probably need to increase the value of Tools|Preferences|Database|Worksheet|Max rows to print in a script. Of course, taking either of these approaches slows things down due to displaying output and scrolling. Same with SQL*Plus. And, as mentioned previously, Java memory management in SQL Developer can cause slow downs and hangs if the result set is large enough.
    Here is a way to minimize that delay, avoid hangs, and get a more repeatable result:
    1) Save some query to, say, C:\Temp\AllCustomers.sql. For example, "select * from customers;" or "select id from customers;".
    2) Run it from a SQL Developer worksheet using Run Script (F5), or from the SQL*Plus command line, with a script like this:
    set timing on
    set termout off
    spool C:\Temp\AllCustomers.lst
    @C:\Temp\AllCustomers.sql
    spool offEven then you will see that the timing results will vary. Maybe "select *" runs much slower than "select id" because the logical output lines are long and get wrapped into multiple physical output lines in the file. Minimize that by setting linesize to a longer value (but only in SQL*Plus -- it isn't supported in SQL Developer) and repeat the test to see. Maybe SQL*Plus runs it much faster than SQL Developer because one is a command line environment and the other a GUI tool with more overhead. Or maybe the SQL Developer JVM is near its size limit and lots of Java garbage collection is slowing it down. Simple question, complicated answer.
    Regards,
    Gary
    SQL Developer Team
    P.S.: And if by chance you are using a version of SQL Developer so old it does not include the output time in the query result tab's toolbar, using Run Script with set timing on is your only recourse.
    Edited by: gggraham on Oct 27, 2011 4:54 PM

Maybe you are looking for