How to requce query.

I want to increment time +1 , I have create one function it's working but is there
any other way to reduce below code with same output. if possible i want only single
query to increment time plush 1 without use to_date dunction.
DECLARE
V_TIME VARCHAR2(5);
V_TIME_PRINT VARCHAR2(5);
BEGIN
-- FIRST EXAMPLE
V_TIME := '17:18';
--- Is there any another way to reduce below quey.
select decode(substr(V_TIME, -2), '59',
decode(substr(V_TIME,0, 2) ,'23','00',
lpad(substr(V_TIME,0, 2) + 1,2,'0') ) || ':' || '00',
lpad(substr(V_TIME,0, 2) ,2,'0') || ':' ||
lpad(substr(V_TIME, -2) + 1,2,'0')) INTO V_TIME_PRINT from dual;
DBMS_OUTPUT.PUT_LINE(V_TIME || ' IN 1 MINUTE INCREMENTAL TIME IS : ' || V_TIME_PRINT);
-- SECOND EXAMPLE
V_TIME := '23:59';
select decode(substr(V_TIME, -2), '59',
decode(substr(V_TIME,0, 2) ,'23','00',
lpad(substr(V_TIME,0, 2) + 1,2,'0') ) || ':' || '00',
lpad(substr(V_TIME,0, 2) ,2,'0') || ':' ||
lpad(substr(V_TIME, -2) + 1,2,'0')) INTO V_TIME_PRINT from dual;
DBMS_OUTPUT.PUT_LINE(V_TIME || ' IN 1 MINUTE INCREMENTAL TIME IS : ' || V_TIME_PRINT);
-- SECOND EXAMPLE
V_TIME := '17:59';
select decode(substr(V_TIME, -2), '59',
decode(substr(V_TIME,0, 2) ,'23','00',
lpad(substr(V_TIME,0, 2) + 1,2,'0') ) || ':' || '00',
lpad(substr(V_TIME,0, 2) ,2,'0') || ':' ||
lpad(substr(V_TIME, -2) + 1,2,'0')) INTO V_TIME_PRINT from dual;
DBMS_OUTPUT.PUT_LINE(V_TIME || ' IN 1 MINUTE INCREMENTAL TIME IS : ' || V_TIME_PRINT);
END;

Hi,
Why you are not using DATE Type?
Anyways here is an example by converting it into date.
SQL> ed
Wrote file afiedt.buf
  1  DECLARE
  2  V_TIME VARCHAR2(5);
  3  V_TIME_PRINT date;
  4  BEGIN
  5  -- FIRST EXAMPLE
  6  V_TIME := '17:18';
  7  SELECT TO_DATE(V_TIME,'HH24:MI')+1/(24*60) into V_TIME_PRINT FROM DUAL;
  8  DBMS_OUTPUT.PUT_LINE(V_TIME || ' IN 1 MINUTE INCREMENTAL TIME IS : ' || TO_
CHAR(V_TIME_PRINT,'HH24:MI'));
  9* end;
SQL> /
17:18 IN 1 MINUTE INCREMENTAL TIME IS : 17:19
PL/SQL procedure successfully completed.
SQL> ed
Wrote file afiedt.buf
  1  DECLARE
  2  V_TIME VARCHAR2(5);
  3  V_TIME_PRINT date;
  4  BEGIN
  5  -- FIRST EXAMPLE
  6  V_TIME := '23:59';
  7  SELECT TO_DATE(V_TIME,'HH24:MI')+1/(24*60) into V_TIME_PRINT FROM DUAL;
  8  DBMS_OUTPUT.PUT_LINE(V_TIME || ' IN 1 MINUTE INCREMENTAL TIME IS : ' || TO_
CHAR(V_TIME_PRINT,'HH24:MI'));
  9* end;
SQL> /
23:59 IN 1 MINUTE INCREMENTAL TIME IS : 00:00
PL/SQL procedure successfully completed.
SQL> ed
Wrote file afiedt.buf
  1  DECLARE
  2  V_TIME VARCHAR2(5);
  3  V_TIME_PRINT date;
  4  BEGIN
  5  -- FIRST EXAMPLE
  6  V_TIME := '17:59';
  7  SELECT TO_DATE(V_TIME,'HH24:MI')+1/(24*60) into V_TIME_PRINT FROM DUAL;
  8  DBMS_OUTPUT.PUT_LINE(V_TIME || ' IN 1 MINUTE INCREMENTAL TIME IS : ' || TO_
CHAR(V_TIME_PRINT,'HH24:MI'));
  9* end;
SQL> /
17:59 IN 1 MINUTE INCREMENTAL TIME IS : 18:00
PL/SQL procedure successfully completed.
SQL>Regards,
Added all your input.
Edited by: Avinash Tripathi on May 14, 2010 12:45 PM

Similar Messages

  • "how to use Query include one month "

    Hi all expert,
    How to make a request how to add table "QTYSALES one month yesterday"
    so that I can compare with this month.
    Query me this:
    SET ARITHABORT OFF
    SET ANSI_WARNINGS OFF
    SELECT T0.ItemCode, T0.Dscription,T1.OnHand, convert(varchar,SUM(T0.BaseQty*T1.NumInSale)) AS 'Qty Sales',DAY(GetDate()) as 'Days',
    Case WHEN Month(GetDate()) in (1,3,5,7,8,10,12) THEN 31 WHEN Month(GetDate()) in (2,4,6,9,11) THEN 30 ELSE 28 END AS 'Total days'
    ,convert (varchar,(t1.onhand/(SUM(T0.BaseQtyT1.NumInSale)/DAY(GetDate()) Case WHEN Month(GetDate()) in (1,3,5,7,8,10,12) THEN 31 WHEN Month(GetDate()) in (2,4,6,9,11) THEN 30 ELSE 28 END)))AS 'TURN OVER IN MONTH'
    ,round(convert (varchar,(t1.onhand/(SUM(T0.BaseQtyT1.NumInSale)/DAY(GetDate()) Case WHEN Month(GetDate()) in (1,3,5,7,8,10,12) THEN 31 WHEN Month(GetDate()) in (2,4,6,9,11) THEN 30 ELSE 28 END))),4)* 30 AS 'Turn Over Days'
    FROM DBO.INV1 T0 INNER JOIN DBO.OITM T1 ON T0.ItemCode = T1.ItemCode
    WHERE Month(T0.DocDate) = Month(GetDate()) AND Year(T0.DocDate) = Year(GetDate())
    GROUP BY T0.ItemCode,T0.Dscription,T1.OnHand
    union
    SELECT T1.ItemCode, T1.itemname,T1.OnHand, '' AS 'Qty Sales',DAY(GetDate()) as 'Days',
    Case WHEN Month(GetDate()) in (1,3,5,7,8,10,12) THEN 31 WHEN Month(GetDate()) in (2,4,6,9,11) THEN 30 ELSE 28 END AS 'Total days'
    ,'No Sales' AS 'TURN OVER IN MONTH'
    ,NULL
    FROM DBO.OITM T1
    WHERE T1.ITEMCODE NOT IN (SELECT ISNULL(ITEMCODE,0) FROM INV1)
    GROUP BY T1.ItemCode,T1.itemname,T1.OnHand
    ORDER BY 1
    thanks for all
    Edited by: rachelhel on May 20, 2009 8:06 AM

    haiiii allll pls help...thankss
    Hi consulatant B1
    How to use Query
    My goal is to create a table to see * The number of sales in a month yesterday *
    I want to make a request showing the amount of sales at the end of the month.
    For example this month is on May 25, so I want to show the Quantity of one month April 25
    I have tried several times, but still just wrong.
    I need expert help to solve the problem for me.
    thanks

  • How can I query all the members of a group using querbuilder?  I cannot find any related properties

    How can I query all the members of a group using querbuilder?  I cannot find any related properties describing members under /home/groups/s/sample_group in jcr repository.

    Hi,
    FieldPoint Explorer is no longer used to configure FieldPoint systems. However, I do not think that the configuring your system in FieldPoint Explorer is causing the error.
    FieldPoint systems are now setup in Measurement and Automation Explorer (MAX).  Information on setting up FieldPoint systems in MAX can be found in the MAX help under: Installed Products>> FieldPoint. Also, I recommend upgrading to the latest FieldPoint driver and version of MAX.  The FieldPoint VI's will be slightly different when you upgrade, so there is a good chance that this will eliminate the error.
    Regards,
    Hal L.

  • How can I query data from XML file stored as a CLOB ?

    Hi folks,
    please see below sample of XML file, which is stored in "os_import_docs", column "document" as CLOB.
    I would like to query this XML file using some SQL select.
    How can I query data form below XML?
    <?xml version="1.0" encoding="UTF-8"?>
    <etd>
      <header>
        <AR>000000000</AR>
        <AW>0</AW>
        <CT>S</CT>
        <CU>H</CU>
        <CZ>SS48</CZ>
        <BU>4</BU>
        <CH>0032</CH>
        <CK>2012-11-01</CK>
        <CL>21:18</CL>
        <CW>225</CW>
        <CX>0</CX>
        <CF>SS-CZL18</CF>
        <DV>2</DV>
      </header>
      <account_group id="234">
        <account id="234">
          <invoice id="000742024">
            <da>
              <AR>000742024</AR>
              <AW>0</AW>
              <CT>D</CT>
              <CU>A</CU>
              <CH>0032</CH>
              <BY>31-10-2012</BY>
              <CA>25-10-2012</CA>
              <AB>234</AB>
              <AA>234</AA>
              <BS>88754515</BS>
              <AD>Mike Tyson</AD>
              <AC>Mike Tyson</AC>
              <AZ>CZ6521232465</AZ>
              <AE/>
              <CG>A</CG>
              <AL>A</AL>
              <BZ>.</BZ>
              <AH>Some street</AH>
              <AI/>
              <AF>Some city</AF>
              <AK>Kraj</AK>
              <AG>CZ</AG>
              <AJ>885 21</AJ>
              <CR>21-11-2012</CR>
              <AY>602718709</AY>
              <AV>800184965</AV>
              <AP/>
              <AO/>
              <AQ/>
              <AN/>
            </da>
            <da>
              <AR>000742024</AR>
              <AW>0</AW>
              <CT>D</CT>
              <CU>A</CU>
              <CH>0032</CH>
              <BY>31-10-2012</BY>
              <CA>25-10-2012</CA>
              <AB>234</AB>
              <AA>234</AA>
              <BS>88754515</BS>
              <AD>Mike Tyson</AD>
              <AC>Mike Tyson</AC>
              <AZ>CZ6521232465</AZ>
              <AE/>
              <CG>A</CG>
              <AL>L</AL>
              <BZ>Mike Tyson</BZ>
              <AH>Some street</AH>
              <AI/>
              <AF>Some city</AF>
              <AK>Kraj</AK>
              <AG>CZ</AG>
              <AJ>885 21</AJ>
              <CR>21-11-2012</CR>
              <AY/>
              <AV>800184965</AV>
              <AP/>
              <AO/>
              <AQ/>
              <AN/>
            </da>
            <detaildc CH="0032" AB="234" BS="11888954" BB="32" BA="CZ" AT="" CI="7077329000002340342" AU="" DU="1Z48395" CB="CZK">
              <dc>
                <AW>0</AW>
                <CT>D</CT>
                <CU>C</CU>
                <BY>31-10-2012</BY>
                <CA>25-10-2012</CA>
                <CV>8151</CV>
                <BT>12111</BT>
                <CJ>1</CJ>
                <AM>0</AM>
                <DR>PC</DR>
                <DS/>
                <DO>25-10-2012</DO>
                <DQ>18:42</DQ>
                <CE>1</CE>
                <BH>8151</BH>
                <CY>8151 SHELL MALKOVICE P</CY>
                <DP>049336</DP>
                <DT/>
                <BQ/>
                <BR>500000</BR>
                <CN>30</CN>
                <CM>030</CM>
                <BO>160,00</BO>
                <BF>38,900</BF>
                <BC>6224,00</BC>
                <BI>32,417</BI>
                <CD>B</CD>
                <BG>0,600</BG>
                <BK>31,817</BK>
                <BJ>0,000</BJ>
                <DI>8</DI>
                <BP>20,00%</BP>
                <CC>CZK</CC>
                <BM>5090,67</BM>
                <BN>1018,13</BN>
                <BL>6108,80</BL>
                <BD>5090,67</BD>
                <BE>1018,13</BE>
                <DW>6108,80</DW>
                <CO>Nafta</CO>
              </dc>
            </detaildc>
            <dt>
              <AR>000742024</AR>
              <AW>0</AW>
              <CT>D</CT>
              <CU>T</CU>
              <CH>0032</CH>
              <BY>31-10-2012</BY>
              <CA>25-10-2012</CA>
              <AB>234</AB>
              <AA>234</AA>
              <BS>11888954</BS>
              <BB/>
              <BA>CZ</BA>
              <DG>1</DG>
              <CN>30</CN>
              <CM>030</CM>
              <DF>160,00</DF>
              <DH>litr</DH>
              <DJ>20,00%</DJ>
              <DD>5090,67</DD>
              <DE>1018,13</DE>
              <DC>6108,80</DC>
              <DB>CZK</DB>
              <DA>P</DA>
              <AX/>
              <CQ/>
              <CP/>
            </dt>
            <dt>
              <AR>000742024</AR>
              <AW>0</AW>
              <CT>D</CT>
              <CU>T</CU>
              <CH>0032</CH>
              <BY>31-10-2012</BY>
              <CA>25-10-2012</CA>
              <AB>234</AB>
              <AA>234</AA>
              <BS>11888954</BS>
              <BB/>
              <BA>CZ</BA>
              <DG>2</DG>
              <CN/>
              <CM/>
              <DF>160,00</DF>
              <DH>litr</DH>
              <DJ/>
              <DD>5090,67</DD>
              <DE>1018,13</DE>
              <DC>6108,80</DC>
              <DB>CZK</DB>
              <DA/>
              <AX/>
              <CQ/>
              <CP/>
            </dt>
            <dt>
              <AR>000742024</AR>
              <AW>0</AW>
              <CT>D</CT>
              <CU>T</CU>
              <CH>0032</CH>
              <BY>31-10-2012</BY>
              <CA>25-10-2012</CA>
              <AB>234</AB>
              <AA>234</AA>
              <BS>11888954</BS>
              <BB/>
              <BA>CZ</BA>
              <DG>19</DG>
              <CN/>
              <CM/>
              <DF/>
              <DH/>
              <DJ/>
              <DD>5090,67</DD>
              <DE>1018,13</DE>
              <DC>6108,80</DC>
              <DB>CZK</DB>
              <DA/>
              <AX/>
              <CQ/>
              <CP/>
            </dt>
            <dt>
              <AR>000742024</AR>
              <AW>0</AW>
              <CT>D</CT>
              <CU>T</CU>
              <CH>0032</CH>
              <BY>31-10-2012</BY>
              <CA>25-10-2012</CA>
              <AB>234</AB>
              <AA>234</AA>
              <BS>11888954</BS>
              <BB/>
              <BA>CZ</BA>
              <DG>8</DG>
              <CN/>
              <CM/>
              <DF/>
              <DH/>
              <DJ/>
              <DD>5090,67</DD>
              <DE>1018,13</DE>
              <DC>6108,80</DC>
              <DB>CZK</DB>
              <DA/>
              <AX/>
              <CQ/>
              <CP/>
            </dt>
          </invoice>
        </account>
      </account_group>
      <footer>
        <AR>999999999</AR>
        <AW>0</AW>
        <CT>S</CT>
        <CU>T</CU>
        <CZ>SS48</CZ>
        <BU>4</BU>
        <CH>0032</CH>
        <CK>2012-11-01</CK>
        <CL>23:04</CL>
        <CW>225</CW>
        <BX>1</BX>
        <CS>7</CS>
        <BW>0000000000000610880</BW>
      </footer>
    </etd>sample - not working:
        select  x.*
        from os_import_docs d
             ,XMLTABLE('/etd/header'
                        PASSING httpuritype(d.document).getXML()
                        COLUMNS
                           response_status varchar2(50) PATH 'AR'
                        )  x
       where d.object_id = 2587058
         and rownum = 1; 
    ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: 6196, maximum: 4000)Many thanks,
    Tomas

    Hello,
    many thanks for the reply. Your examples are very usefull for me.
    To answer your questions.
    An XML structure:
    /etd
        /header - repeat in each row in output
        /account_group/account
            /invoice
                /da - repeat for each details under "selected "invoice
                /detaildc/dc - the lowest level 
                /detaildn/dn - the lowest level 
                /dt - repeat for each details under "selected "invoice
        /footer - repeat in each row in outputI would like to to have a 1 row for each "record" in /detaildc section and include related nodes at higher levels.
    Please see below XML file, which is simplified file of example in first post, but includes a complete xml structure which needs to be queried in db.
    <?xml version="1.0" encoding="UTF-8"?>
    <etd>
      <header>
        <AR>000000000</AR>
        <CK>2012-10-31</CK>
        <CF>SS-CZL19</CF>
      </header>
      <account_group id="234">
        <account id="234">
          <invoice id="EI08P4000">
            <da>
              <AR>EI08P4000</AR>
              <AD>Mickey Mouse</AD>
            </da>
            <detaildc DU="1Z56655" CB="EUR">
              <dc>
                <DO>16-10-2012</DO>
                <CY>ASFINAG POST_MAUT</CY>
                <BM>1940,60</BM>
                <CO>Dalnicni znamka</CO>
              </dc>
            </detaildc>
            <detaildc DU="2Z55050" CB="EUR">
              <dc>
                <DO>17-10-2012</DO>
                <CY>ASFINAG POST_MAUT</CY>
                <BM>1328,10</BM>
                <CO>Dalnicni znamka</CO>
              </dc>
            </detaildc>
            <detaildc DU="2Z90001" CB="EUR">
              <dc>
                <DO>27-10-2012</DO>
                <CY>ASFINAG POST_MAUT</CY>
                <BM>185,10</BM>
                <CO>Poplatek</CO>
              </dc>
            </detaildc>
            <dt>
              <AR>EI08P4000</AR>
              <DG>8</DG>
            </dt>
          </invoice>
        </account>
        <account id="234">
          <invoice id="EI13T7777">
            <da>
              <AR>EI13T7777</AR>
              <AD>Mickey Mouse</AD>
            </da>
            <detaildc DU="1Z48302" CB="EUR">
              <dc>
                <DO>26-10-2012</DO>
                <CY>SANEF 07706 A 07704</CY>
                <BM>232,10</BM>
                <CO>Dalnicni poplatek</CO>
              </dc>
            </detaildc> 
            <detaildc DU="1Z48302" CB="EUR">
              <dc>
                <DO>20-10-2012</DO>
                <CY>TEST A 07704</CY>
                <BM>30,10</BM>
                <CO>Poplatek</CO>
              </dc>
            </detaildc>       
            <dt>
              <AR>EI13T7777</AR>
              <DG>8</DG>         
            </dt>
          </invoice>
        </account>
        <account id="234">
          <invoice id="EI327744">
            <da>
              <AR>EI327744</AR>
              <AD>Mickey Mouse</AD>
            </da>
            <detaildn  CI="707732 00000234" >
              <dn>
                <BY>30-10-2012</BY>
                <BM>8,10</BM>
              </dn>
            </detaildn>
            <detaildn CI="707732 00000234" >
              <dn>
                <BY>30-10-2012</BY>
                <BM>399,50</BM>
              </dn>
            </detaildn>
            <dt>
              <AR>EI327744</AR>
            </dt>
          </invoice>
        </account>
        <account id="234">
          <invoice id="EI349515">
            <da>
              <AR>EI349515</AR>
              <AD>Mickey Mouse</AD>
            </da>
            <detaildc DU="1Z56514" CB="EUR">
              <dc>
                <DO>29-10-2012</DO>
                <CY>ALLAMI AUTOPALYAKEZE</CY>
                <BM>1240,60</BM>
                <CO>Dalnicni znamka</CO>
              </dc>
            </detaildc>
            <detaildc DU="1Z56515" CB="EUR">
              <dc>
                <DO>19-10-2012</DO>
                <CY>ASFINAG POST_MAUT</CY>
                <BM>7428,10</BM>
                <CO>Dalnicni znamka</CO>
              </dc>
            </detaildc>
            <detaildc DU="1Z56515" CB="EUR">
              <dc>
                <DO>12-10-2012</DO>
                <CY>UK</CY>
                <BM>954,10</BM>
                <CO>Poplatek</CO>
              </dc>
            </detaildc>
            <dt>
              <AR>EI349515</AR>
              <DG>8</DG>
            </dt>
          </invoice>
        </account>
      </account_group>
      <footer>
        <CZ>SS47</CZ>
        <BU>4</BU>
        <CH>0032</CH>
        <CK>2012-10-31</CK>
        <CL>01:25</CL>
      </footer>
    </etd>Expected output
    AR     CK     CF             AR4             AD             DU     CB     DO             CY                     BM      CO                AR5             DG     CI             BY               BM6     CZ     BU       CH       CK7    CL
    0     41213     SS-CZL19     EI08P4000     Mickey Mouse     1Z56655     EUR     16-10-2012     ASFINAG POST_MAUT     1940,60     Dalnicni znamka        EI08P4000     8                                    SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI08P4000     Mickey Mouse     2Z55050     EUR     17-10-2012     ASFINAG POST_MAUT     1328,10     Dalnicni znamka        EI08P4000     8                                    SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI08P4000     Mickey Mouse     2Z90001     EUR     27-10-2012     ASFINAG POST_MAUT      185,10     Poplatek        EI08P4000     8                                    SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI13T7777     Mickey Mouse     1Z48302     EUR     26-10-2012     SANEF 07706 A 07704      232,10     Dalnicni poplatek  EI13T7777     8                                    SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI13T7777     Mickey Mouse     1Z48302     EUR     20-10-2012     TEST A 07704               30,10     Poplatek        EI13T7777     8                                    SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI327744     Mickey Mouse                                                                      EI327744          707732 00000234     30-10-2012     8,10     SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI327744     Mickey Mouse                                                                      EI327744          707732 00000234     30-10-2012     399,50     SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI349515     Mickey Mouse     1Z56514     EUR     29-10-2012     ALLAMI AUTOPALYAKEZE     1240,60     Dalnicni znamka        EI349515     8                                    SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI349515     Mickey Mouse     1Z56515     EUR     19-10-2012     ASFINAG POST_MAUT     7428,10     Dalnicni znamka        EI349515     8                                    SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI349515     Mickey Mouse     1Z56515     EUR     12-10-2012     UK                      954,10     Poplatek        EI349515     8                                    SS47     4     32     41213     01:25

  • How to use query-database() function in transformation?

    Hi All,
    How to use query-database() function in transformation?
    It is giving four fields but if i write select query in sqlquery field it is saying select node is not found....
    plz help me out
    Regards
    Pavankumar
    Edited by: [email protected] on Jul 29, 2009 2:49 AM

    Hi,
    To answer your query:-
    http://abhishek-soablog.blogspot.com/2008/08/orclquery-database.html
    Cheers,
    Abhi...

  • Need to find out how much % of query completed from OEM

    Need to find out how long will a query take to run or when I am running the query where can I check to see that X% of my query is complete.
    Is that % shown on OEM --> Performance --> Top Activitity?

    Under OEM/GC of release 10g you won't be able to see how long the query will take neither how much % of a query are already finished.
    I know that this functionality was given in the old release of the OEM (javas based GUI with ll the databases on the left side). I'm missing
    that old functionality, too...

  • How to get query result in comma dilimited text or excel file?

    Does anybody know how to get query results in comma delimited
    text file or excel file, I tried spool abc.txt, but the result
    showed some ------ lines
    Thanks

    Try doing this in your sql scripts
    set heading off
    set pagesize 0
    set linesize 4000
    set feedback off
    set verify off
    set trimespace on
    set colsep ","
    spool output.txt
    select * from dual (or whatever you are querying
    spool off
    There may be a couple other set statement that you could add but
    this should get you started in the right direction

  • How do create query in SAP?

    Dear Expert
    How do create query report in SAP?
    thanks for advance

    hi
    this is to inform you that,
    please follow the links:
    http://wiki.sdn.sap.com/wiki/display/ERPFI/abap+query
    http://wiki.sdn.sap.com/wiki/display/sandbox/ABAP+queries
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/40bec8da-4cd8-2910-27a9-81f5ce10676c?quicklink=index&overridelayout=true
    hope this clears your issue
    balajia

  • How to re-query viewobject

    Hi Guys,
    How to re-query view object( with the new values from database) after an event.
    I have a text input and a submit button, when the user enters order number and click on the button I am displaying order information in a table. Now I have one more
    button which calls a oracle api through a database procedure( which prints some documents and process some information about the order).
    1) After this event(click of button) I also want to re-query existing view object because order information has been changed through that api call.
    example: earlier order status was open after api call the status has been changed to closed. it shows closed in the database but on the form it still showing open.
    2) How do i display a message saying " reports have been submitted to xxx printer" in the middle of page( I have used OAException to display but it shows at the top of the page).
    Thanks.

    Thanks for the help. first one worked. Can you please send me some code for adding dynamic message in tip bean.
    Also one more question- I am currently displaying some data in advanced table and one of the column is serial number.
    I need to display serial number if it exists for that line otherwise I need to display a button.( so conditionally i need to display
    either serial number data or serial number button). i have the serial number attribute in the view object.
    Thanks again.

  • Reg how an sql query works?

    I am new to Oracle and sql/plsql. What is the background processes happening when an sql query is fired to the database?
    In short how an sql query is actually working?
    what are the steps involved in it?
    pls provide me the links if it is tedious to reply
    Thanks

    Every SQL-Select Statement meets three stages parse, execute, and fetch. To know completely how SQL and PL/SQL work with Oracle, you must have to read the below Oracle Link seriously.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/sqlplsql.htm
    Regards,
    Sabdar Syed.

  • How can this query avoid full table scans?

    It is difficult to avoid full table scans in the following query because the values of column STATUS reiterant numbers. There are only 10 numbers values for the STATUS column (1..10)
    But the table is very large. there are more than 1 million rows in it. A full table scanning consumes too much time.
    How can this query avoid full table scans?
    Thank you
    SELECT SYNC,CUS_ID INTO V_SYNC,V_CUS_ID FROM CONSUMER_MSG_IDX
                      WHERE CUS_ID = V_TYPE_CUS_HEADER.CUS_ID AND
                            ADDRESS_ID = V_TYPE_CUS_HEADER.ADDRESS_ID AND
                            STATUS =! 8;Edited by: junez on Jul 23, 2009 7:30 PM

    Your code had an extra AND. I also replaced the "not equal" operator, which has display problems with the forum software
    SELECT SYNC,CUS_ID
       INTO V_SYNC,V_CUS_ID
      FROM CONSUMER_MSG_IDX
    WHERE CUS_ID = V_TYPE_CUS_HEADER.CUS_ID AND
           ADDRESS_ID = V_TYPE_CUS_HEADER.ADDRESS_ID AND
           STATUS != 8;Are you sure this query is doing a table scan? Is there an index on CUS_ID, ADDRESS_ID? I would think that would be mostly unique. So I'm not sure why you think the STATUS column is causing problems. It would seem to just be a non-selective additional filter.
    Justin

  • How to build query which list only active PC's

    Hi guys,
    I have to install SCCM client on many devices in my enviroment. Unfortunately, SCCM has found amny devices which still have accounts in AD but are not used for looong time. I would like to list only devices, which hasen't installed SCCM client yet but are
    active in my enviroment. 
    That is possible? If yes, that will be glad to hear how build this query.
    Thank you.

    If you don't want those not used devices, why don't you stop discovering them. In the
    Active Directory System Discovery there is a tab Options
    in which you can configure to not discover computers account that have not been used.
    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude

  • How to display query result in seperated page.

    How to display query result in seperated page, if the results are very big (more than 5000 records) and there are so many concurrent users (about 500 - 1000 users).
    Are there any solutions or frameworks?
    Plese help me .........
    thanks,
    --bhasin

    Hi,
    How to display query result in seperated page?I think RowSet will be the better technology to use in this
    situation.For more information on this please visit http://developer.java.sun.com/developer/Books/JDBCTutorial/chapter5.html
    which explains in detail about RowSets.
    Hope this helps.
    Good Luck.
    Gayam.Srinivasa Reddy
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support/

  • How to send query string to OSB Business Service?

    Hi
    I need to call a Servlet which is accepting http get request.
    My system design is
    I have a web service interface that I need to expose to Front end application. I am using Proxy service for this.
    Then I have a servlet at end system and using Business service to send request to servlet.
    I need to pass username, password, jndi context and payload using url encoding.
    What all steps do I need to follow for this? How to create query string , which variable I need to play with inbound or outbound?
    I have gone through all the answers on this forum but could not understand much.
    Thanks
    Vibhor

    Hii
    I am still unable to send http get request to end service.
    In flow I have setted $outbound/transport/request-http/query-string too.
    But I have to send request with url encoding.
    How to encode query string and how can I check whether my request is going correctly or not, is there any variable in which complete url would be stored.
    Thanks
    Vibhor
    Edited by: Vibhor Rastogi on Sep 15, 2010 9:49 AM

  • How to create Query (Sq01) fro service contract

    hi,
    How to create Query for Service contracts , where i need to take a report for sub line items of that particular Service contract.
    Ex: we maintain short text - services in the initial screen ,
           in the next screen we maintain the sub line items for that short text (Activity numbers).
    Please guide me on this.
    Regards,

    Hi Sowmya,
    1 Create User Group (SQ03)
    Specify the users who should be authorized to run the query.
    2.
    Create Infoset (SQ02)
    Indicates from which part of the SAP database the data is going to be retrieved and how the data is to be retrieved by the query.
    3.
    Create Queries (SQ01)
    Create the query and arrange the layout
    for joining the two tables there should be common field should be available in both the tables then only we can able to join the table and run the query
    or use this below link
    http://www.sap-img.com/abap/step-for-using-query-sq01-sq02-sq03.htm
    Regards,
    Pramod

Maybe you are looking for

  • Creative Suite 6 Design and Web Premium will not Reinstall: Says Serial Number is not "Valid"

    Chat support has been no help.  I uninstalled Creative Suite 6 because I was having issues with some of the software and hoped that a reinstall would solve the problem.  Now the software will not reinstall.  It takes me to the validation screen where

  • Error in data extraction

    Hi all, I getting following error while extracting data from R/3. 1 LUWs confirmed and 1 LUWs to be deleted with FB RSC2_QOUT_CONFIRM_DATA Call up of customer enhancement BW_BTE_CALL_BW204010_E (BTE) with 503 records Result of customer enhancement: 5

  • Show new rows at top. Is it possible?

    Hi all, I am using Java Studio Creator 1 � Update 2. When the user is allowed to insert new records in a table one or more empty record will be visible at the bottom of the table. And the user can then simply enter the new data in theses empty record

  • G4 12" 133 won't boot consistantly after repairs

    I replaced the optical drive on my PB, and while I was at it replaced the case bottom which was bent, so I had the thing pretty well all the way apart. I put it together and it started up just fine, and ran a week or so like that, but then started re

  • R12: Unrealized Gain/Loss Report cutoff

    The Unrealized Gain/Loss Report will report on all open AP Invoices. For cut-off purposes we require the report to 'cut-off' at period end: The report should list all open invoices as of a specific accounting date, regardless if the invoice is paid w