Select on view

I have a SQL Report region in which I call a view from another schema.<br><br>
SELECT *
FROM vw_invoices
WHERE invoice_number BETWEEN :P1_INVOICEFROM AND :P1_INVOICETO;
[PRE]<br><br>
In my particular case, I enter the from invoice number and the to invoice number.  I get back 515 rows.  When I run the exact same query in SQL*Plus, I get 474 rows.  I just cut and pasted the query from HTML DB to SQL*Plus.  Similar to this (just an example):<br><br>
[pre]
VAR p1_invoicefrom NUMBER;
VAR p1_invoiceto NUMBER;
EXEC :P1_INVOICEFROM := 1;
EXEC :P1_INVOICETO := 20;
<br><br>
SELECT *
FROM vw_invoices
WHERE invoice_number BETWEEN :P1_INVOICEFROM AND :P1_INVOICETO;I might just be going crazy. I don't think I can replicate it on htmldb.oracle.com because I would only have access to one schema.
Has anyone experienced something like this?
chet

TO_NUMBER<BR><BR>
SELECT *
FROM vw_invoices
WHERE invoice_number BETWEEN TO_NUMBER( :P1_INVOICEFROM ) AND TO_NUMBER( :P1_INVOICETO );<br><br>
silly mistake.<br><br>
chet

Similar Messages

  • How to Pre-Select a View for ALV dashboard at runtime

    Hello Experts,
    The requirement is to pre-select 1 view initially (out of several configured) for 'All' users and disable the 'View-selection' dropdown function in a standard ALV dashboard. So whenever the dashboard loads, a particular view has to be set automatically for all users.
    I need your help for the first part, which is to always pre-set a 'View' in a standard dashboard.
    I tried to implement the suggestion provided in the following thread:
    How to apply ALV view at runtime
    However I couldn't make this work in my case. I created a Post-Exit of a method in Comp Ctlr of dashboard (Initialize method) - where I receive the refrence 'IWCI_SALV_WD_TABLE'. Then calling the method 'GET_CONFIG_DATA' with action 'if_salv_wd_table=>set', I try to set the view, but it has no effect.
    Thanks a lot for your help,
    Abir

    Hi abir,
    Use this and alv1 is my alv component name
        DATA LO_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
        LO_CMP_USAGE =   WD_THIS->WD_CPUSE_ALV1( ).
        IF LO_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
          LO_CMP_USAGE->CREATE_COMPONENT( ).
        ENDIF.
        DATA LO_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
        LO_INTERFACECONTROLLER =   WD_THIS->WD_CPIFC_ALV1( ).
    LS_PARAM_IN TYPE IF_SALV_WD_TABLE=>S_TYPE_PARAM_CONFIG_IN.
    ls_param_in-default = "your view name " ( view is of type wdr_pers_variant)
        DATA LO_VALUE TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
        LO_VALUE = LO_INTERFACECONTROLLER->GET_CONFIG_DATA( ls_param_in )
    Regards
    Srinivas
    Edited by: sanasrinivas on Dec 30, 2011 7:15 AM

  • How to select plant view in BAPI_MATERIAL_SAVEDATA

    Hi Friends,
    I am using standard BAPI (BAPI_MATERIAL_SAVEDATA) to create Material Master. There is no option to select plant view in headdata itself but i need to populate plant data. So i've used PLANTDATA and PLANTDATAX parameter to pass plant name,storage location and period indicator.
    say
    PLANTDATA-plantname = '0011'.
    PLANTDATA-storagelocation = '0011'.
    PLANTDATA-periodind = 'D'.
    PLANTDATAX-plantname = '0011'.
    PLANTDATAX-storagelocation = 'X'.
    PLANTDATAX-periodind = 'X'.
    The material gets created but plant view is not created.
    <<text removed>>
    Thanks in advance.
    Regards,
    Prabhu
    Edited by: Matt on May 5, 2009 11:15 AM - don't use ASAP

    Hello,
    Try this
    Data:
               PLANTDATA           LIKE BAPI_MARC,             "ins H 592229
               PLANTDATAX          LIKE BAPI_MARCX,            "ins H 592229
    Get plant
          IF FT-FNAM = 'RM03M-WERKS'.                          "ins H 592229
            PLANTDATA-PLANT = FT-FVAL.                         "ins H 592229
            PLANTDATAX-PLANT = FT-FVAL.                        "ins H 592229
          ENDIF.             
        CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'                 "ins H 592229
             EXPORTING                                         "ins H 592229
               HEADDATA            = HEADDATA                  "ins H 592229
               CLIENTDATA          = CLIENTDATA                "ins H 592229
               CLIENTDATAX         = CLIENTDATAX               "ins H 592229
               PLANTDATA           = PLANTDATA                 "ins H 592229
               PLANTDATAX          = PLANTDATAX                "ins H 592229
             IMPORTING                                         "ins H 592229
               RETURN = RETURN_CODE2                           "ins H 592229
             TABLES                                            "ins H 592229
               MATERIALDESCRIPTION = MATERIALDESCRIPTION.      "ins H 592229
    Check this standard one is using in the same way
    see this program MMCP3FP0

  • The Control A key is not working. I cannot multi-select my songs. I'm not sure if it is the problem with iTunes 10.6.1.7 or my PC settings encounter issues. Also, i cannot find Album Artwork online using iTunes and i cannot select any view form but List.

    The Control A key is not working. I cannot multi-select my songs. I'm not sure if it is the problem with iTunes 10.6.1.7 or my PC settings encounter issues. Also, i cannot find Album Artwork online using iTunes and i cannot select any view form but List.

    The Control A key is not working. I cannot multi-select my songs. I'm not sure if it is the problem with iTunes 10.6.1.7 or my PC settings encounter issues. Also, i cannot find Album Artwork online using iTunes and i cannot select any view form but List.

  • Event handler for selecting 3d views

    Hi,
    Is there any event handlers for when a user selects a view?
    I would like to be able to base actions after a view is selected but can't figure away to do it other then creating my own list of views.
    Thanks!

    ...Yes indeed! :-) It's called the CameraEventHandler. It gets triggered whenever a user changes a view. You can use the returned "event" object to get info about the camera (or modify it), to just use the eventHandler to trigger other activity as you mentioned.
    Here's a simple example which outputs all the camera properties to the console window at view change.
    //===============================================
    myCEH = new CameraEventHandler();
    myCEH.onEvent = function(CameraEvent)
    console.println("CameraEvent.binding = " + CameraEvent.binding );
    console.println("CameraEvent.far = " + CameraEvent.far );
    console.println("CameraEvent.fov = " + CameraEvent.fov );
    console.println("CameraEvent.currentTool = " + CameraEvent.currentTool );
    console.println("CameraEvent.canvas = " + CameraEvent.canvas );
    console.println("CameraEvent.isNewCanvas = " + CameraEvent.isNewCanvas );
    console.println("CameraEvent.near = " + CameraEvent.near );
    console.println("CameraEvent.projectionType = " + CameraEvent.projectionType);
    console.println("CameraEvent.targetDistance = " + CameraEvent.targetDistance);
    console.println("CameraEvent.transform = " + CameraEvent.transform );
    console.println("CameraEvent.viewPlaneSize = " + CameraEvent.viewPlaneSize );
    runtime.addEventHandler(myCEH);
    //===============================================

  • How to select multiple views in lsmw

    Hi Friends,
    i am uploading the falat file data using LSMW ..
    MY QUESTION IS .. when uplodong data through lsmw
    i want select 2 views ....
    ex: i am uploding 100 records .. in this records ..
    we don't no how many records are realated to perticular view??? for this how to run the lamw??
    i am uploading MM02 data...for 100 records..
    some recorsd are realted to classification view and others are
    sales org view..how to run the lsmw??
    pls. explain.
    regards,

    hi
    Using the read statement. y bcoz u r putting data in an internal table for a table control. so u want to retieve a particular row so use index position along with read statement.
    if it is useful,please reward points.
    Regards,
    satish

  • Can anyone tell me if you can select to view your podcasts in  TILE VIEW like before. thanks

    can anyone tell me if you can select to view your podcasts in  TILE VIEW like before. thanks

    I am having the same problems.  Firstly found out that I had a duplicate email address on two apple ids so I fixed that but now it wont let me verify the email address.  When I click on "verify email address" nothing happens.  So frustrating cos cant set up Facetime or iMessage on my iPad.

  • Views - SELECT from VIEW and SELECT from the query inside view definition returning different results

    Hi,
    I am facing this weird issue. Any help would be appriciated.
    I have view with the following definition:
    CREATE VIEW [marketing].[OpenedMails]
    AS
    SELECT
    ID_EmailAddress, 
    ID_Date_Opened, 
    ID_Contact, 
    ID_MailSendJobs,
    COUNT(ID_OpenedMails) AS OpenCount,
    CASE
    WHEN ROW_NUMBER() OVER (PARTITION BY CAST(ID_EmailAddress AS VARCHAR(10)) + ' ' + CAST(ID_MailSendJobs AS VARCHAR(10)) ORDER BY ID_Date_Opened) = 1 THEN 1 
    ELSE 0 
    END
    AS UniqueOpenCount
    FROM            
    dbo.Fact_OpenedMails
    where ID_Contact = 382340
    GROUP BY ID_EmailAddress, ID_Date_Opened, ID_Contact, ID_MailSendJobs;
    order by ID_MailSendJobs 
    When I run the the select statement in the view definition I get combination of both 1 and 0 for the 'UniqueOpenCount' column.
    But when I run the select from the view itself using the following query:
    SELECT [ID_EmailAddress]
          ,[ID_Date_Opened]
          ,[ID_Contact]
          ,[ID_MailSendJobs]
          ,[OpenCount]
          ,[UniqueOpenCount]
      FROM [marketing].[OpenedMails]
    I get equal amount of rows but only 0 values for the 'UniqueOpenCount' column which seems to be very weird to me. Why is this happening ? Can anyone help regarding how to solve this ??
    Result from the select inside view definition:
    Result from the select query directly from the view:
    Thanks in advance.
    Vivek Kamath

    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. You failed. Temporal
    data should use ISO-8601 formats – you failed again. Code should be in Standard SQL AS much AS possible and not local dialect. 
    This is minimal polite behavior on SQL forums. 
    Things like “ID_Date_Opened” are wrong. The affixes “id” and “date” are called attribute properties in ISO-11179 and data modeling. Since a date is a unit of measurement on a temporal scale, it cannot be an identifier by definition. My guess is this would be
    “open_date” if it were done right. And the only display format in ANSI/ISO Standard SQL is ISO-8601 (yyyy-mm-dd)
    An email address of -1?? Email addresses are VARCHAR(256), not numeric. There is no reason to cast them AS string!
    Your vague “mail_send_jobs” is plural, but columns hold scalars and cannot be plural by definition. The partition cause can hold a list of columns: 
    WHEN ROW_NUMBER() 
         OVER (PARTITION BY email_address, mail_send_job 
                   ORDER BY open_date)
         = 1 
    THEN 1 ELSE 0 END 
    This still makes no sense, but the syntax is better. You do not understand how ROW_NUMBER() works. 
    Would you like to try again with proper Netiquette? 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Employee selection table view not opening in MSS while selecting process

    Hello Everyone,
      In MSS, Team->Start Process for Employee Employee selection table view is not visible, so without selecting employee if i click Select Process button its telling employee is not selected.. How make that Employee selection view visible in MSS..

    This may be structural authorization issue. Execute RHBAUS00 for the user then check what happens.
    Sandip

  • Select Accounting View in BDC Program

    Hi Experts,
      I am working on a BDC program in which I have to change the Accounting view data for Materials(MM02).
    Each material has diferent number of views. So How can I select only the Accounting View when changing Material data through BDC.
    Thanks
    Kumar

    Hi ashok ,
    ideally you should use BAPI_Material_savedata to change the material master.
    as far as your problem goes you can use the following method to select appropraite view in MM02.
    SET PARAMETER ID 'MXX' FIELD c_v.
    c_v is a char 1 constant and can have values
    User department                Maintenance statu(Value of c_v)
    Work scheduling                A
    Accounting                        B
    Classification                     C
    MRP                                 D
    Purchasing                        E
    Production resources/tools     F
    Costing                             G
    Basic data                        K
    Storage                            L
    Forecasting                      P
    Quality management         Q
    Warehouse management   S
    Sales                               V
    Plant stocks                      X
    Storage location stocks     Z
    Regards,
    N.
    Edited by: navjot sharma on May 26, 2008 2:02 PM

  • Wrong selection of views

    hi expert
       i create a material master with T CODE- MM01 by mistake i select worng views and i save it
      i also use the T CODE -MM02 but it not done
    how we remove these view.
    Pls suggest me
    Anurudh singh

    Dear
    anurudh sinngh
    as per my knowldge , u want to change the Material type, in views their in nothing called Finished view, for Semi/fin all most all views are same, , u go to Transaction .*MMAM* if u wnat to change material type. change material type. from finished to semi.
    replay
    madhu

  • How to block user create personal view and select ALL VIEW?

    How to block user create personal view and select ALL VIEW?

    Hello,
    >create personal view
    To restrict creating personal view, you need to modify your existing permission level or create new one. Login with admin account to your site and open role.aspx page (http://siteurl/_layouts/role.aspx). Then click on existing permission or add new permission
    level-->and move to "Personal Permissions" section-->uncheck "Manage Personal Views - Create, change, and delete personal views of lists" option. Later you can assign this permission to all users, whom you don't want
    to allow to create.
    >and select ALL VIEW
    Since SP does not supports view level permission directly so you have to use custom solution or use below designer solution to restrict user to open any view.
    http://www.codeproject.com/Articles/433486/How-to-set-view-level-permissions-out-of-the-box-i
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • What is the process for mm01 datatransfer by selecting different views

    what will be the basic thing to be done for selecting different views?

    hi ..if want to upload master data for different views then first create material using MM01 and then update material for different views one by one in MM02..for mass data transfer u can use BDCs for MM01 and MM02
    regards

  • Select which view to show in a popup window

    Hi all,
    in my WD4A application I have several popup windows. So I have created one window with one view for every such purpose (and call them via if_wd_window_manager->create_window).
    My question: Is it possible to create one (generic) window, attach all possible views to it and select the view I want to load during call of the popup window (maybe via an inbound plug)?
    Thanks in advance!
    Kind regads, Matthias

    Hi Mathias ,
    what you can do is prepare window set one view as a default......now in wdoinit of window you fire a outbound plug (linked to inbound of different views) depending on your check it will navigate to desired view.. this is what we have done in EHP's also...where depending on switch state we navigate to old or new views..
    Regards
    Anuj Goyal

  • Can't select from view even though it appears in ALL_VIEWS

    Oracle's documentation states that all_views "describes the views accessible to the user":
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_2117.htm
    DBA_OBJECTS appears in the ALL_VIEWS, yet I get a "table or view does not exist" error when I try to select from it.
    Any thoughts on why this is happening?
    SQL> SELECT COUNT(1)
      FROM all_views
      WHERE owner = 'SYS'
      AND view_name = 'DBA_OBJECTS'
      COUNT(1)
             1
    1 row selected.
    SQL> SELECT *
      FROM sys.dba_objects
    SELECT *
      FROM sys.dba_objects
    Error at line 2
    ORA-00942: table or view does not exist

    That's not standard behaviour:
    DBA >create user u1 identified by u1;
    Utente creato.
    DBA >grant connect to u1;
    Concessione riuscita.
    DBA >conn u1/u1
    Connesso.
    DBA >select count(0) from all_views;
      COUNT(0)
           856
    DBA >select view_name from all_views
      2  where view_name like 'DBA%'
      3  or view_name like 'V$%';
    VIEW_NAME
    DBA_PROCEDURES
    DBA_PUBLISHED_COLUMNS
    V$OBJECT_USAGE
    DBA >select 'select count(*) from '||owner||'.'||view_name||';'
      2  from all_views
      3  where view_name like 'DBA%'
      4  or view_name like 'V$%';
    'SELECTCOUNT(*)FROM'||OWNER||'.'||VIEW_NAME||';'
    select count(*) from SYS.DBA_PROCEDURES;
    select count(*) from SYS.DBA_PUBLISHED_COLUMNS;
    select count(*) from SYS.V$OBJECT_USAGE;
    DBA >select count(*) from SYS.DBA_PROCEDURES;
      COUNT(*)
          6793
    DBA >select count(*) from SYS.DBA_PUBLISHED_COLUMNS;
      COUNT(*)
             0
    DBA >select count(*) from SYS.V$OBJECT_USAGE;
      COUNT(*)
             0All the DBA* or V$ visible are also accessible, DBA_OBJECTS is not present in ALL_VIEWS.
    There's something strange on your user's priviledges...
    Max
    [My Italian Oracle blog|http://oracleitalia.wordpress.com/2010/01/02/query-gerarchiche/]

  • How to select a row in a single-select table view?

    Hello folks,
    I have a table view with a 'details' button. When a row is selected and 'details' is pressed, the table view disappears and a form view is displayed (like the toggle button in PCUI). I have implemented this using a navigation link. When I press 'cancel' in the form view, another navigation link takes the user back to the table view.
    My problem is, when the table view reappears, there is no row selected (the row that was selected previously, is de-selected). How do I make sure that the row remains selected?
    I tried using the collection_wrapper->mark() method in the inbound plug of the table view, but it works only for multi-select table.

    Hi Masood,
    Thanks for your reply.
    I had already tried using MARK ( iv_index = lv_index ), but it did not work because the first statement in the MARK method is
      check ME->MULTI_SELECT = ABAP_TRUE.
    Mine is a single-select table. So, using the MARK of the iterator object, with either the IV_BO or the IV_INDEX parameter also does not work. Is there any other way for a table with single row selection?
    Thanks!!!
    Rohan.

Maybe you are looking for

  • Windows 2008 64-bit and Microsft ODBC for Oracle problem

    Hello, I am trying to create ODBC connection to Oracle 9i Database on remote server. I am using Windows 2008 64-bit but it is not showing Microsoft ODBC Driver for Oracle. Could any one suggest what to do?\\ Thanks

  • Question regarding an inline view or function inside SQL

    Hi All, I want to know whether using an inline view with in an sql query is better or a function call within the sql query is better. When I check the explain plan in both the case I can see no difference in the cost. Appreciate your valuable suggest

  • Normalising XML structure.

    I have this xml file which has white space in every element. I need to normalise the whole xml structure so that i do not have any extra spaces. Right now i have to use normalise space function in transformation for each element. Is there any way nor

  • Cluster Disk Logical Disk Performance Counters Problem

    I have some problem with Oracle cluster. It's a two node Windows server 2008 R2 SP1 cluster with MS Failover cluster. I have SCOM 2012 SP1 with latest OS MP (agent running with local system rights). All other cluster are showing fine performance coun

  • InDesign Zoom Level

    I'm having a problem on zoom level. Whenever I create a new document, my zoom level always too high. It's always showing at 700%, making my insertion point large whenever I create an text frame.