Can we write the select statement on maintence view for data retreval

Can we use the select statement on maintence view
Regrads
Diva

No. U cannot write a select on maintenance view.

Similar Messages

  • Can I write a SELECT query on maintenance view?

    Hi,
    Can we write a select query on maint. view? If not what are the views on which we can write the select queries?

    hi,
    you can write select query for maintenance view, database view and projection view but not helpview as it is only intended for f4 help.
    reward if helpful
    prasanth

  • How can i write the following statements in Java ???

    Hi Everyone,
    I'm studying UML and according to my textbook, it says if 2 classes have the following relationship then it can be said that there's an association relationship between those 2 classesl.
    Class A and B are associated if :
    - an object of class A sends a message to an object of class B
    - an object of class A creates an object of class B
    - an object of class A has an attribute whose value are objects of class B or collections of objects of class B
    - an object of class A receives a message with an object of class B as an argument.
    However, I dunno how to write those stuff into Java codes. Can someone please kindly write Java codes for those sentences ?? Thanks everyone in advance.

    Sorry guys. I know I shouldn't have asked in the first place without giving it a try first. Yeah, I been doing
    Java without understanding the concept of real OOP and its terms.
    - an object of class A sends a message to an object of class B // ?????
    - an object of class A creates an object of class B // A obj=new A();
    - an object of class A has an attribute whose value are objects of class B or collections of objects of class B // A varB;
    - an object of class A receives a message with an object of class B as an argument. // ?????
    I get confused with the very first line and the last line . I dunno what it means by sending a message but according to what JoachimSauer mentioned
    it's "calling a method" but does that mean even I called an object of the same class within , can i still refers it as sending a message ?? Like what if
    i call a static method of the calling object because I dun think i create an object when I call a static method ?
    Let's say
    class ExampleOne
         public ExampleOne()
              ExampleOne egOne=new ExampleOne();
              egOne.display(); //can i refer to this as egOne object sending a message to an object of itself so the receiver is also egOne ??
         public void displayOne()
              System.out.println("Just an exampleOne");
    class ExampleTwo
         public ExampleTwo()
              ExampleTwo.display(); // here no object creation occurs , just ExampleTwo class sends a message to itself so there's no association i assume .
         public static void displayTwo()
              System.out.println("Just an exampleTwo");
    public class Main
         public static void main(String args[])
              ExampleOne exampleOne=new ExampleOne();
              ExampleTwo exampleTwo=new ExampleTwo();
    }I'm confused. at first , i thought sending a message means passing values as parameters when we call a function and receiving a message means the function
    being called receive values as parameters. Phew, please help me out of this.

  • Problem in the select statement

    I have to select the values of the fields BEZEI  depending on tha sales order number vbeln. HOw can i write the select statement what will be the tables associated?

    Hi,
    tables: vbak.
    types: begin of ty_vbak,
               vbeln type vbeln,
               kokrs type kokrs,
              end of ty_vbak,
              begin of ty_it_tka01,
                kokrs type kokrs,
                bezei type bezei,
              end of ty_tka01.
    data: it_vbak type table of ty_vbak,
            wa_vbak type ty_vbak,
            it_tka01 type table of ty_tka01,
            wa_tka01 type ty_tka01.
    Select-options: s_vbeln for vbak-vbeln.
    Select VBELN KOKRS from VBAK into table it_VBAK where vbeln in s_vbeln.
    if sy-subrc = 0.
    select KOKRS BEZEI from TKA01 into it_tka01 for all entries in it_vbak where kokrs = it_vbak-kokrs.
    endif.
    Loop at it_vbak into wa_vbak.
    read table it_tka01 into wa_tka01 with key kokrs = wa_vbak-kokrs.
    if sy-subrc = 0.
    * Move data to final internal table.
    endif.
    endloop.
    Regards,
    Satish

  • Restricting records in the select statement

    Hi,
    I have one requirement where in i need to restrict my select statement to get only 250 records in the output table.
    Here are the select statements i am using....
        SELECT a~ebeln
                     a~lifnr
                     a~ekgrp
                     b~werks
                     b~matnr
               FROM ekko AS a INNER JOIN ekpo AS b
               ON aebeln = bebeln
               INTO TABLE i_ekko
               WHERE a~ebeln IN r_ebeln AND
                            a~lifnr IN r_lifnr AND
                            a~ekgrp IN r_ekgrp AND
                            b~werks IN r_ewerk AND
                            b~matnr IN r_matnr AND
                            a~bstyp = 'F'.
                IF NOT i_ekko[] IS INITIAL.
    Select Vendor name
               SELECT lifnr
                            name1
                      FROM lfa1
                      INTO TABLE i_lfa1
                      FOR ALL ENTRIES IN i_ekko
                      WHERE lifnr = i_ekko-lifnr.      
    Here if i restrict the first select statement to get only 250 records then i am not getting the desired record in the second select statement.
    Could anyone let me know how to write the select statement.
    Regards,
    Ramesh

    restric the first select using up to 250.
    sort the i_ekko by vendor name.
    ex: sort i_ekko by lifnr.
    use second select statement here.

  • Can call a function in the select statement?

    Is there any ways to call a function in the select statement?
    what I like to do is this:
    select deptno, totalEmployees(deptno), TotalSalary(deptno)
    from emp;
    I know it can be done by count(*) and join tables, but my case
    is much more complex and the where clauses are different from
    one function to another, and have many tables to join and many
    combinations
    Thanks

    Functions can be used in a select statement subject to certain
    restrictions, see
    http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/
    server.817/a85397/statem9b.htm#2062024
    It's under "CREATE FUNCTION> Keywords and Parameters> function>
    Restrictions on User-Defined Functions"
    Here is an except...
    When a function is called from within a query or DML statement,
    the function cannot:
    a) Have OUT or IN OUT parameters
    b) Commit or roll back the current transaction, create or roll
    back to a savepoint, or alter the session or the system. DDL
    statements implicitly commit the current transaction, so a user-
    defined function cannot execute any DDL statements.
    c) Write to the database, if the function is being called from a
    SELECT statement. However, a function called from a subquery in
    a DML statement can write to the database.
    d) Write to the same table that is being modified by the
    statement from which the function is called, if the function is
    called from a DML statement.
    Except for the restriction on OUT and IN OUT parameters, Oracle
    enforces these restrictions not only for the function called
    directly from the SQL statement, but also for any functions that
    function calls, and on any functions called from the SQL
    statements executed by that function or any function it calls.

  • How can I call a Page Process from the Select statement for Report Page

    I'm able to call a javascript using the below:
    img src="#IMAGE_PREFIX#add2.gif" border="0" alt="Icon 4" onClick="javascript:add_connect1('||CPORT.ID||')"
    But Now,
    I'd like to accomplish (2) New things:
    1. instead of using,....... onClick="javascript:add_connect1,
    I'd like to call a Page Process, onClick=
    2. I'd like to be able to call two different processes onClick.
    a. onClick="javascript:passBack('||ID||')"
    b. onClick= <Please see my question #1 above>
    Can someone please help me with the syntax for this,
    If indeed it can even be done?
    Thanks- Gary

    Greg.
    It seems that my situation is the one you describe in you second paragraph, where you mention:
    you could then add the ID column value as a parameter to the javascript functionBut,
    I do not know how to reference the variable in my javascript nor how to use it in my on-demand process.
    If you can hellp me past this last little bump, then I think I will be able to use these skills in Sooo many different areas of my design.
    Here's what I've got so far:
    A. In the select statement I identify the javascript as:
    onClick="javascript:connect_port('<font color=blue>''||ID||''</font>')";
    B. In my javascript I have this:
    <script language="JavaScript" type="text/javascript">
    function connect_port(ID)
    var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=CONNECT_PORT',0);
    gReturn = get.get();
    get = null;
    </script>
    C. In my on demand function I have this:
    BEGIN
    INSERT INTO CCONNECTIONS_B
    BLDG_ID,CLST_ID,PORT_ID,STRAND_ID
    ) VALUES
    :P2004_BLDG_ID,:P2004_CLST_ID,:P2004_PORT_ID,:P2004_STRAND_ID1
    END;
    You can see that I dont know how to use the value for 'ID' in either the javascript or the On-Process function.
    If you can help me out with this one, Then I can imitate it for the rest.
    -Gary
    Edited by: garyNboston on Apr 3, 2009 6:44 AM
    Edited by: garyNboston on Apr 3, 2009 6:44 AM
    Edited by: garyNboston on Apr 3, 2009 6:45 AM
    Edited by: garyNboston on Apr 3, 2009 6:47 AM

  • Write a SELECT statement in different ways is not the same thing!!!

    Let's take a look
    use AdventureWorks2012
    go
    dbcc freeproccache
    go
    and now select something
    select * from [HumanResources].[vEmployeeDepartmentHistory]
    go
    so, analyzing 'Compiled Plan'
    SELECT usecounts, cacheobjtype, objtype, text
    FROM Sys.dm_exec_cached_plans
    CROSS APPLY sys.dm_exec_sql_text(plan_handle)
    where cacheobjtype = 'Compiled Plan'
    ORDER BY usecounts DESC;
    GO
    and now let's write some SELECT in "fuzzy case"
    dbcc freeproccache
    go
    select * from [HUMANResources].[vEmployeeDepartmentHistory]
    go
    select * from [HumanRESOURCES].[vEmployeeDepartmentHistory]
    go
    select * from [HumanResources].[VEmployeeDepartmentHistory]
    go
    select * from [HumanResources].[vEmployeeDEPARTMENTHistory]
    go
    select * from [HumanResources].[vEmployeeDepartmentHISTORY]
    go
    SELECT * from [HumanResources].[vEmployeeDepartmentHistory]
    go
    select * FROM [HumanResources].[vEmployeeDepartmentHistory]
    go
    and now let's see compiled plans again
    SELECT usecounts, cacheobjtype, objtype, text
    FROM Sys.dm_exec_cached_plans
    CROSS APPLY sys.dm_exec_sql_text(plan_handle)
    where cacheobjtype = 'Compiled Plan'
    ORDER BY usecounts DESC;
    GO
    So, write a SELECT statement in different ways is not the same thing!!!
    Hope it'll be useful
    P.Ceglie

    Yes.  There is little or no query normalization that happens in front of the query plan cache.  It would be a performance tradeoff to parse and normalize the query before matching it to the cached plans.  The benefit of reducing the number
    of plans in the cache probably wouldn't be worth it. 
    David
    David http://blogs.msdn.com/b/dbrowne/

  • How can i write the below code using "For all entries"

    Hi
    How can we write the below code using "for all entries" and need to avoid joins...
    Please help
    SELECT aaufnr aobjnr aauart atxjcd a~pspel
    agstrp awerks carbpl cwerks
    INTO TABLE t_caufv
    FROM caufv AS a
    INNER JOIN afih AS b
    ON aaufnr = baufnr
    INNER JOIN crhd AS c
    ON bgewrk = cobjid
    AND c~objty = 'D'
    WHERE ( a~pspel = space
    OR a~txjcd = space
    OR NOT a~objnr IN
    ( select OBJNR from COBRB AS e
    WHERE objnr = a~objnr ) )
    AND a~werks IN s_plant
    AND a~auart IN s_wtype
    AND NOT a~objnr IN
    ( select OBJNR from JEST AS d
    WHERE objnr = a~objnr
    AND ( dstat = 'A0081'OR dstat = 'A0018' )
    AND d~inact 'X' ).
    Reward points for all helpfull answers
    Thanks
    Ammi.

    Hi,
    SELECT objnr objid aufnr
            from afih
            into table t_afih.
    SELECT objnr
            from JEST
            into table t_JEST
            where stat = 'A0045'
               OR stat = 'A0046'
               AND inact 'X'.
    SELECT objnr
            from COBRB
            into table t_cobrb.
    SELECT arbpl werks objid objty
          from crhd
          INTO table it_crhd
          FOR ALL ENTRIES IN it_afih
          WHERE objty eq 'D'
          AND gewrk = it_afih-objid.
    SELECT aufnr objnr auart txjcd pspel gstrp werks aufnr
            FROM caufv
            INTO table t_caufv
            FOR ALL ENTRIES IN it_afih
            WHERE aufnr = it_afih-aufnr
              And pspel = ' '
              AND txjcd = ' '
             ANd objnr ne it_crhd-objnr
              AND auart in s_wtype
              AND werks in s_plant.
             AND objnr ne it_jest-objnr.
    dont use NE in the select statements, it may effect performance also. Instead use if statements inside
    loops.
    loop at t_caufv.
    read table it_chrd............
      if t_caufv-objnr ne it_chrd-objnr.
      read table it_jest..........
       if   if t_caufv-objnr ne it_jest-objnr.
        (proceed further).
       endif.
      endif.
    endloop.
    hope this helps.
    Reward if useful.
    Regards,
    Anu

  • How can I write a SQL statement which checks if a table exists?

    How can I write a SQL statement which tells me whether a table exists?

    execute an sql query: select * from <tablename>
    catch the exception n check whether the erroe code
    matches the one that occurs for table doesn't exist
    that's itHow is your answer any different from the one given in the first reply?
    It isn't.
    As WorkForFood says DatabaseMetaData has a bunch of methods for getting information about tables but this is more useful when you don't know the names of any of the tables.. it sounds like you do so I would concur SELECT from table is probably the quickest way to go. If it helps the Xopen error should be either S1000 or 42S01 (I think) but I would try and see if there is a specific vendor code for table not found/not exists error and check for that.

  • How can I write the analogous code to the logic:iterate tag functionality

    Hai This is Rayalu .And I am very new to the Java World. I have a doubt?.How can I write the analogous code to the<logic:iterate> tag functionality using the JSP Tag Libraries . Pleae Send me some examples .

    Hi,
    SELECT objnr objid aufnr
            from afih
            into table t_afih.
    SELECT objnr
            from JEST
            into table t_JEST
            where stat = 'A0045'
               OR stat = 'A0046'
               AND inact 'X'.
    SELECT objnr
            from COBRB
            into table t_cobrb.
    SELECT arbpl werks objid objty
          from crhd
          INTO table it_crhd
          FOR ALL ENTRIES IN it_afih
          WHERE objty eq 'D'
          AND gewrk = it_afih-objid.
    SELECT aufnr objnr auart txjcd pspel gstrp werks aufnr
            FROM caufv
            INTO table t_caufv
            FOR ALL ENTRIES IN it_afih
            WHERE aufnr = it_afih-aufnr
              And pspel = ' '
              AND txjcd = ' '
             ANd objnr ne it_crhd-objnr
              AND auart in s_wtype
              AND werks in s_plant.
             AND objnr ne it_jest-objnr.
    dont use NE in the select statements, it may effect performance also. Instead use if statements inside
    loops.
    loop at t_caufv.
    read table it_chrd............
      if t_caufv-objnr ne it_chrd-objnr.
      read table it_jest..........
       if   if t_caufv-objnr ne it_jest-objnr.
        (proceed further).
       endif.
      endif.
    endloop.
    hope this helps.
    Reward if useful.
    Regards,
    Anu

  • If I want to order by dateAdded to I have to include it in the select statement like

    If I do this:
    <cfquery name="chart" datasource="#datasource#">
    select behaviourID,score, dateAdded2 = convert(varchar,
    dateAdded , 101)
    from staff_charts_data
    where userID =
    <cfqueryparam value="#arguments.userID#"
    cfsqltype="cf_sql_integer"> AND
    NOT score = 5
    </cfquery>
    If I want to order by dateAdded to I have to include it in
    the select statement like so:
    <cfquery name="chart" datasource="#datasource#">
    select behaviourID,score, dateAdded2 = convert(varchar,
    dateAdded , 101),dateAdded
    from staff_charts_data
    where userID =
    <cfqueryparam value="#arguments.userID#"
    cfsqltype="cf_sql_integer"> AND
    NOT score = 5
    </cfquery>

    you should be able to order by dateAdded without it being in
    the select clause. The only time the order by field has to be in
    the select clause is when your query has an aggregate and group by
    clause, like this:
    select field1, field2, max(field3) as youralias
    from sometables
    where whatever
    group by field1, field2
    order by ???
    You can only order field1, field2, max(field3) or youralias.
    You can't order by field4.

  • Issue with Past Month data in the Select Statement

    Hi,
    I written the following query,
    SELECT   /*+NO_MERGE(A)*/
                CASE
                   WHEN snap_shot_date > a.q3
                   AND snap_shot_date <= a.q4
                      THEN q4char
                   WHEN snap_shot_date > a.q2 AND snap_shot_date <= a.q3
                      THEN q3char
                   WHEN snap_shot_date > a.q1 AND snap_shot_date <= a.q2
                      THEN q2char
                   WHEN snap_shot_date > a.q0 AND snap_shot_date <= a.q1
                      THEN q1char              
                END snap_shot_date,
                CASE
                   WHEN snap_shot_date > a.q3 AND snap_shot_date <= a.q4
                      THEN 1
                   WHEN snap_shot_date > a.q2 AND snap_shot_date <= a.q3
                      THEN 2
                   WHEN snap_shot_date > a.q1 AND snap_shot_date <= a.q2
                      THEN 3
                   WHEN snap_shot_date > a.q0 AND snap_shot_date <= a.q1
                      THEN 4
                END sort_by,
                pillar3_exposure_class_code, pd_band_description,
                ROUND (SUM (p3.ead_post_sec_post_crm)),
                ROUND (SUM (notional_principle)),
                DECODE (SUM (notional_principle),
                        0, 0,
                        ROUND (  SUM (DECODE (exposure_type,
                                              'UNDRAW', ead_post_sec_post_crm,
                                              0
                               / SUM (notional_principle),
                               4
                DECODE (SUM (p3.ead_post_sec_post_crm),
                        0, 0,
                        ROUND (  SUM (pd_value * p3.ead_post_sec_post_crm)
                               / SUM (p3.ead_post_sec_post_crm),
                               2
                DECODE (SUM (p3.ead_post_sec_post_crm),
                        0, 0,
                        ROUND (SUM (rwa) / SUM (p3.ead_post_sec_post_crm), 4)
                DECODE (SUM (p3.ead_post_sec_post_crm),
                        0, 0,
                        ROUND (  SUM (lgd_rate * p3.ead_post_sec_post_crm)
                               / SUM (p3.ead_post_sec_post_crm),
                               2
                TO_CHAR (MAX (a.max_date), 'FMMonth DD, YYYY')
           FROM summary.pillar3 p3,
                (SELECT DISTINCT (month_end_date) max_date,
                                 LAST_DAY (month_end_date) q4,
                                 TO_CHAR (LAST_DAY (month_end_date),
                                          'MON YYYY'
                                         ) q4char,
                                 ADD_MONTHS (LAST_DAY (month_end_date), -3) q3,
                                 TO_CHAR
                                    (ADD_MONTHS (LAST_DAY (month_end_date), -3),
                                     'MON YYYY'
                                    ) q3char,
                                 ADD_MONTHS (LAST_DAY (month_end_date), -6) q2,
                                 TO_CHAR
                                    (ADD_MONTHS (LAST_DAY (month_end_date), -6),
                                     'MON YYYY'
                                    ) q2char,
                                 ADD_MONTHS (LAST_DAY (month_end_date), -9) q1,
                                 TO_CHAR
                                    (ADD_MONTHS (LAST_DAY (month_end_date), -9),
                                     'MON YYYY'
                                    ) q1char,
                                 ADD_MONTHS (LAST_DAY (month_end_date), -12) q0
                            FROM rcdwstg.stg_bcar_detail) a
          WHERE snap_shot_date BETWEEN ADD_MONTHS (a.max_date, -12) AND a.max_date
       GROUP BY CASE
                   WHEN snap_shot_date > a.q3 AND snap_shot_date <= a.q4
                      THEN q4char
                   WHEN snap_shot_date > a.q2 AND snap_shot_date <= a.q3
                      THEN q3char
                   WHEN snap_shot_date > a.q1 AND snap_shot_date <= a.q2
                      THEN q2char
                   WHEN snap_shot_date > a.q0 AND snap_shot_date <= a.q1
                      THEN q1char
                END,
                CASE
                   WHEN snap_shot_date > a.q3 AND snap_shot_date <= a.q4
                      THEN 1
                   WHEN snap_shot_date > a.q2 AND snap_shot_date <= a.q3
                      THEN 2
                   WHEN snap_shot_date > a.q1 AND snap_shot_date <= a.q2
                      THEN 3
                   WHEN snap_shot_date > a.q0 AND snap_shot_date <= a.q1
                      THEN 4
                END,
                pillar3_exposure_class_code,
                pd_band_description
       ORDER BY 2 DESC;I have written the query to get the latest 12 months data from a table and split that into 4 quarter to show in the Cognos Report. But when the table having 13th or the past months data, the select statement is showing Empty values in the first two columns and fetching the 13 month data too.
    Can anyone help me in this to avoid the problem.
    Thanks
    Radha K

    WHERE snap_shot_date BETWEEN ADD_MONTHS(TRUNC(a.max_date, 'MM'), -11) AND  a.max_date
    ....

  • Case sensitive statement in the select-statement

    Hi All,
    i have a table in the abap-dictionary filled with names...when i try to select them with the select-statement with condition:
    table-name_column like 'some_name'
    I have encountered some problems...the inquiry is case-sensitive. What i want to do is to read the value from the abap-dictionary table uppercase or lowercase and compare it with the needed value also translated in uppercase or lowercase.
    The only idea i have is to select all values of the dictionary table into an internal table and to translate the values there in uppercase or lowercase and then to loop trough it. But this approach would cost a lot of performance.
    Do someone has an other proposal?

    check...
    Select statement
    It would be difficult , because it is based on how data is stored in the data base , now consider the scenario of the system i am using , we can material description as 'test' or 'TEST' , 'Test' .
    If in your system there are only stored in either caps or small the you can perform the select twice .
    But i myself dont find it to be such a good solution , but you can give it a try
    There is one more solution specific to material description ,and that is in the table MAKT there is a field MAKTG , which stored the description in uppercase , so for this you can first convert the description to uppercase and then perform select on this field

  • Can we write an IIF statement in Designer??

    Hi dears,
    Can we write an IIF statement in Designer when we connect to the SAP BI 7.0 InfoCube?
    I try to add a new dimension object to my universe design by using IIF statement.
    At the below you can find my simple IIF statement.
    <EXPRESSION>IIF([0FISCPER3].[LEVEL01].[[40FISCPER3]].[Value]='January',1,0)</EXPRESSION>
    Is there anything wrong with syntax or smt??
    my Business Objects env is BOXI 3.2
    thanks a lot,
    Omer

    Hi,
    this one includes samples:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0a45246-ce76-2b10-e688-f5c8206203eb
    Ingo

Maybe you are looking for

  • Webcenter crashing with core dump

    Hi All, Once in a while Webcenter(11.1.1.5) is crashing and generating core dump and the error message is same evertime. We tried to research on addPartialTriggerListeners and found this kind of behaviour is a bug in apache trinidad version 1.2.5-cor

  • Can't open Mozilla FF in Program Files

    I print the NY Times Crossword every night. Since I got my new computer (Windows 7 Home Premium, 64 bit, Firefox 3.6.10) my bookmarked Puzzle link causes FF to crash every time. In this forum I thought I found the fix. It said to go to Program Files/

  • How to put a repeatable shadow at the bottom of a wine bottle

    I'll select an image of a bottle (beer or wine) and it's all nice and clean around the bottom, totally isolated from the background.  I've asked Photoshop savvy friends how to do this and they all have come up with some workaround that is not repeata

  • IPhone 5, mail box and maps?

    1:How can I add extra mail box's in mail. 2: cCan I get street view in maps? please help. thanks. chris

  • Connect mac to tv

    I have a Macbook with a shattered screen.  Upon turning on the system it normally prompts me for a password before entering the main screen. Recently I bought a HDMI (TV) to Mini Displayport hoping that I could view what's on my broken screen.  I rea