An example outputs wrong

for example:
<?php
create table testtable (
order_number number(4),
item_id number(4),
quantity number(8),
item_desc varchar2(16)
insert into testtable values (1001,1,10,'apple');
insert into testtable values (1001,2,20,'banana');
insert into testtable values (1002,2,50,'banana');
insert into testtable values (1002,1,30,'apple');
insert into testtable values (1003,3,60,'orange');
insert into testtable values (1004,3,50,'orange');
commit;
Table Test DATA
order_number item_id quantity item_desc
1001 1 10 apple
1001 2 20 banana
1002 2 50 banana
1002 1 30 apple
1003 3 60 orange
1004 3 50 orange
$con = oci_connect("apps","apps","prod") or die("Unable to connect oracledatabase");
$sql = "select * from testtable";
$result = oci_parse($con,$sql);
oci_execute($result);
echo "<table border = 1>";
echo "<td>COMPANY</td>";
echo "<td>ORDER_NUMBER</td>";
echo "<td>ITEM_ID</td>";
echo "<td>QUANTITY</td>";
echo "<td>ITEM_DESC</td>";
$totalcomany = 0;
while ($rows = oci_fetch_array($result,OCI_BOTH)) {
if((isset($l_company) and $l_company != $rows['COMPANY']) or empty($result)) {
echo "<tr bgcolor='#CCFFCC'>";
echo "<td colspan= 3 align='center'>".$l_company."</td>";
echo "<td >".$totalcomany." </td>";
$totalcomany = 0;
echo "<td > </td>";
echo "</tr>";
$l_company = $rows['COMPANY'];
echo "<tr>";
echo "<td>".$rows['COMPANY']."</td>";
echo "<td>".$rows['ORDER_NUMBER']."</td>";
echo "<td>".$rows['ITEM_ID']."</td>";
echo "<td>".$rows['QUANTITY']."</td>";
echo "<td>".$rows['ITEM_DESC']."</td>";
$totalcomany = $totalcomany + $rows['QUANTITY'];
echo "</tr>";
echo "</table>";
?>
who can test my above example and you will find its output has a little wrong.
COMPANY A can be calculated sum while COMPANY B not .
who can help me and renew some code about it ?
thanks!

create table testtable (
company varchar2(6),
order_number number(4),
item_id number(4),
quantity number(8),
item_desc varchar2(16)
insert into testtable values ('A',1001,1,10,'apple');
insert into testtable values ('A',1001,2,20,'banana');
insert into testtable values ('A',1002,2,50,'banana');
insert into testtable values ('B',1002,1,30,'apple');
insert into testtable values ('B',1003,3,60,'orange');
insert into testtable values ('B',1004,3,50,'orange');
commit;
Table Test DATA
company order_number item_id quantity item_desc
A 1001 1 10 apple
A 1001 2 20 banana
A 1002 2 50 banana
B 1002 1 30 apple
B 1003 3 60 orange
B 1004 3 50 orange
*/

Similar Messages

  • How to make this example output in using Excel table ?

    for example :
    <?php
    $con = oci_connect("apps","apps","prod");
    $sql = " select h.order_number,to_char(h.ordered_date,'YYYY/MM/DD HH24:MI'),h.order_type_id
    from oe_order_headers_all h
    where to_char(h.ordered_date,'YYYYMMDD') = '20060620'
    and h.org_id = 85 ";
    $smt = oci_parse($con, $sql);
    oci_execute($smt);
    echo "<table border = 1>";
    echo "<tr><td>order_number</td><td>ordered_date</td><td>order_type</td></tr>";
    while($rows = oci_fetch_array($smt,BOTH_NUM)) {
    echo "<tr>";
    echo "<td>".$rows[0]."</td>";
    echo "<td>".$rows[1]."</td>";
    echo "<td>".$rows[2]."</td>";
    echo "</tr>";
    echo "</table>";
    ?>
    above example outputs table generally from IE while i want to make it output throught Excel and outputs Excel table.
    who can help me ?
    thanks!

    Hi,
    the pear command is a programm, which is installed together with php, as long as you did not configured php with the configure-option "--without-pear".
    After you have downloaded a package like Spreadsheet_Excel_Writer-0.9.0.tgz into a folder like, let's say
    c:\myDownloads\pear\ (on Windows-systems)
    or /myDownloads/pear/ (on UNIX-systems)
    you take your Commandline (console, xterm ... ( onUNIX)) or CMD (on Windows) and change to that directory:
    $> cd /myDownloads/pear (UNIX)
    $> CHDIR C:\myDownloads\pear\ (Windows)
    After this, just type:
    pear install Spreadsheet_Excel_Writer-0.9.0.tgz
    press [ ENTER ] and that's it. The installation will be finished.
    After this small steps are done, you can start writing code, using Spreadsheet_Excel_Writer
    running
    $> pear --help
    will give you more infos on using the pear utilities.
    Greetings from Hamburg
    Thorsten

  • Why does this simple example output such result?

    for example:
    public class ArithmeticDemo {
    public static void main(String[] args){
    double x = 27.475;
    double y = 7.22;
    System.out.println("Subtracting...");
    System.out.println(" x - y = " + (x - y));
    above example output below:
    Subtracting...
    x - y = 20.255000000000003
    it should output below result:
    Subtracting...
    x - y = 20.255
    who can tell me why?
    who can help me?
    thanks

    hi
    im not precise, but the reason for above result should be internal representation of double.
    there is something called precision when dealing with floats and double.
    if u really bothered about only three digit precision try this!
    DecimalFormat df = new DecimalFormat(".000");
    System.out.println(" x - y = " + df.format((x - y)));
    as my all time favorite author, Kathy sierra used to say,
    if u really want to fall asleep try reading how doubles are represented in system, and how they are manipulated.
    anyway, if u find anything regarding this please lets all know.
    thanks & regards
    vijay

  • Program output wrong

    Hi,
    class MyTokenizer has one constructor, MyTokenizer(String s), and one method, tokenAt(int i) that returns the i-th token of the string passed to the constructor. It follows the usual Java convention of counting from zero, and uses the default token delimiters as defined in the StringTokenizer class. The method returns null if the argument of tokenAt is less than zero or greater than the number of tokens in the string. For example, if one constructs an object
    MyTokenizer hamlet = new MyTokenizer(�To be or not to be�)
    then
    hamlet.tokenAt(0) returns �To�,
    hamlet.tokenAt(3) returns �not�,
    hamlet.tokenAt(17) returns null, etc.
    There is another class, MyTokenizerTest, that uses JOptionPane to get a string from the user. Then, in a loop, I use another JOptionPane to get integers from the user and pass them as arguments to tokenAt, displaying the return value in the DOS window. I Exit from the loop when the user presses �Cancel� on the JOptionPane
    Just try running this program and you will see the wrong output.
    Please tell help me with this.
    <---------------------------------------------------------------------->
    import java.util.StringTokenizer;
    import java.lang.Character;
    public class MyTokenizer
         private String str;
         Constructs an object of MyTokenizer
         @param s The string
         public MyTokenizer(String s)
              str = s;
         Finds a token of the string at any position
         @param i the ith token of the string
         @retrun token the token at the ith position
         public String tokenAt(int i)
              String str1;
              str1 = "";
              int words;
              words = 0;
              int k;
              k = 0;
              for (int j = 0; j < str.length(); j++)
                   if (Character.isWhitespace(str.charAt(j)))
                        words++;
                   if (words == i + 1)
                        k = j;
                        break;
              for (int c = k + 1; c < str.length(); c++)
                   str1 = str1 + str.charAt(c);
                   if (Character.isWhitespace(str.charAt(c)))
                        break;
              return str1;
    <---------------------------------------------------------------------->
    import javax.swing.JOptionPane;
    import java.util.StringTokenizer;
    import java.lang.String;
    This class tests the MyTokenizer class
    public class MyTokenizerTest
         Tests the methods of MyTokenizer class
         @param args not used
         public static void main(String[] args)
              String s = JOptionPane.showInputDialog("Enter a String");
              System.out.println(s);
              MyTokenizer myToken = new MyTokenizer(s);
              boolean done = false;
              while (!done)
                   String strInt = JOptionPane.showInputDialog("Enter the position of a word");
                   if (strInt == null)
                        done = true;
                   else
                   int i = Integer.parseInt(strInt);
                   System.out.println(myToken.tokenAt(i));

    Firstly since your Tokenizer is 0-based, why should you add one at the following points? Try removing the + 1
    if (words == i + 1)
    for (int c = k + 1; c < str.length(); c++)
    Secondly you check for whitespace before you check whether the word has been reached. This results in a miss for the 1st word. Switch the two if blocks in "for (int j = 0; j < str.length(); j++)" and try again.
    HTH.

  • GetRequestURI outputs wrong path

    I've written a servlet Counter that outputs a jpeg image. I setContentType to "image/jpeg". And it works nicely when I coded a IMG tab ie. <IMG src="servlet/Counter"> in my index.htm page from the root directory.
    However I notice that the request.getRequestURI(); statement in my counter servlet now returns the path where the servlet is (ie servlet/Counter) rather than the html page that calls it (ie root/index.htm).
    How can I rectify this to get the caller's URI rather than the servlet path ?.
    Rags

    Thanks Kare for your response.
    >>
    I've written a servlet Counter that outputs a jpeg
    image. I setContentType to "image/jpeg". And it works
    nicely when I coded a IMG tab ie. <IMG
    src="servlet/Counter"> in my index.htm page from the
    root directory.
    However I notice that the request.getRequestURI();
    statement in my counter servlet now returns thepath
    where the servlet is (ie servlet/Counter) ratherthan
    the html page that calls it (ie root/index.htm).
    There is nothing wrong with your servlet container.
    When changed the servlet to output to contenttype txt/html and output the counter as html code; Using the SERVLET tag (vs the IMG tag), the method getRequestURI() returns the path I want (i.e html path).
    It looks like
    How can I rectify this to get the caller's URIrather
    than the servlet path ?.Maybe you can give the page name as an argument for
    the Counter servlet.
    like: <img
    src="servlet/Counter?page=root/index.html">
    and the in servlet code call:
    request.getParameter("page");
    The whole purpose of implementing this is so that I don't have to specify the path. Any other ideas ?
    regards
    Rags

  • HELP: keyboard button outputs wrong letters/symbols

    I just got a bootcamp windows 7 on my macbook pro. after doing this, i cannot seem to type the "~" key next to the number 1 key. instead of "~" it outputs "\" and "|" when pressed with shift.
    has anyone encountered a similar problem or know how to fix this?
    I do not know whether this problem has to do with the bootcamp, but it used to work before.

    The best way to do this is to download Sharpkeys, an open source software available at http://sharpkeys.codeplex.com/
    You don't need to install anything, just execute the .exe.
    On the main screen, ADD a "rule".
    In the window above, use the "Type Key" button.
    Just press the ~` key on the top left of the keyboard and you will see the window above. This is the key code for this key, which is interpreted wrongly as |\ in bootcamp. Click OK.
    You now have to choose the new mapping for this key, as in the next image.
    Then click OK, and don't forget to write to the registry, using the button at the bottom right of the main "rules" window. Reboot and that's it.

  • Bank Statement Import Execution Report output wrong?

    Hi all,
    In EBS R 12.1.3. for the concurrent request Bank Statement Import Execution Report i have always as output :
    Miscellaneous Receipts Created
       ---------------------Transaction-------------------
    Line      Numbe       Type                 Date        Curr           Amount
    2         25-МАР-2012 Misc Receipt         25-MAR-12   BGN          9,000.00
    4         25-МАР-2012 Misc Payment         25-MAR-12   BGN              1.00
    5         25-МАР-2012 Misc Receipt         25-MAR-12   BGN             10.00I checked the interface tables - they are empty...
    Even the output is strange... it created miscellaneous receipts which i'm not sure is possible via this program.
    Any ideas? Do i have to purge other tables?
    The interface tables for errors are also empty.
    Thanks in advance,
    Bahchevanov.

    Hi,
    Thanks for reply.
    The tables i'm checking are ce_statement_headers_int, ce_statement_lines_interface. For any errors: CE_HEADER_INTERFACE_ERRORS, CE_LINE_INTERFACE_ERRORS.
    I found that these 3 lines are reconciled. When i unreconciled them and after that reconciled again - they disappeared from the output.
    Do you know if that program contains information about the statements created?
    Because if i execute it, it creates bank statement header with lines correctly but i received no information about what i just created.
    Thanks in advance,
    Bahchevanov.

  • Peak search outputs wrong value

    I'm using the peak search VI to trend amplitudes from a power spectrum. The peak search VI is not outputing the correct amplitudes.  They are off by a little bit everytime.  I have looked at the output arrays from the power spectrum, and I have verified the peak search is getting good input data but outputting something unexpected. I have the peak search set for: 1) Single Max Peak, Threshold=0, Start=57.8Hz, Stop=59Hz and 2) Single Max Peak, Threshold=0, Start=61 Hz, Stop=62.2Hz. Neither one is displaying the correct value.  I will post my code, but the file I'm opening is a .dat so I can't post that.
    Solved!
    Go to Solution.
    Attachments:
    Viewer with 1X MSP and RPM trends- Troubleshooting.vi ‏850 KB

    The spectrum peak search VI is doing a curve fit to identify peaks. The peak search algorithm is described in the help:
    SVFA Spectrum Peak Search Details
    The SVFA Spectrum Peak Search VI finds all the peaks within the spectrum and performs amplitude/frequency or amplitude/order estimation on each individual peak. The VI operates on magnitude and power spectra.
    Usually, the spectrum is computed based on a windowed input signal. The closed form of any cosine window, such as Hanning, Hamming, Blackman-Harris, and so on, is known. The presence of three dominant bins indicates a local maximum on the power spectrum. Therefore, when the SVFA Spectrum Peak Search VI locates three dominant bins, a curve fitting algorithm maps the window shape onto the three bins and estimates the true frequency and amplitude of that particular tone. The following illustration diagrams the concept of the algorithm.
    ==================
    If you want the local maxima of the spectra, you can use the following code:
    Doug
    NI Sound and Vibration

  • Projector Outputting Wrong

    About 1 in every 3 times that I ouput a Mac projector on Mac
    running Flash 8, flash creates a Classic Application projector
    which won't open in OS 10.4. No idea why this is happening but it's
    incredibly annoying. This happened with previous versions of flash
    also. They would randomly output a classic application instead of
    an OS X application. It even has the old OS 9 icon attached to it.
    Anyone seend this before? It's driving me crazy.

    I guess this is not a common problem but with the help of an Adobe specialist, The problem was a Windows files set used by many applications (such as printer control menus and several pop-up configuration menus that use a windows system font is left out if you install an upgrade to Windows 8 on a fresh hard drive. It's a legal install. I had Windows 8, 32 bit but needed Windows 8, 64 bit so I bought the upgrade version and used the Win 32 credentials to verify the upgrade eligability.
    The problem when doing this is a system font family (Segoe) used in the full Win 8 version or the OEM version is not in the upgrade version. This results in it not being installed when upgrading on a clean disc from an upgrade disc. Whatever reason Microsoft has for doing this, the nightmare of problems it caused me took over a week to track it down. I'd like to take credit for this solution but it was an Adobe on-line chat session with a helpful technician that really deserves the credit.
    All is working fine now, thanks to Adobe.

  • [WONTFIX] Wrong colours in Adobe Reader (acroread)

    When viewing this file in Adobe Reader 9.5.5, the colours look utterly wrong, they are way too dark and distorted. At first I thought it was an issue with the CMYK colours in the original picture, but when I converted the picture to RGB colour space (embedded in the example file), the issue persists. It doesn't appear in Poppler-based pdf viewers like Evince, nor in pdf.js, the default pdf viewer in Firefox. I also had a look in Adobe Reader XI on Windows XP (in a VirtualBox) and the colours appeared correctly to me.
    $ pdfimages -list acroreadtest.pdf
    page num type width height color comp bpc enc interp object ID x-ppi y-ppi size ratio
    1 0 image 934 560 gray 1 8 jpeg no 8 0 200 200 15.0K 2.9%
    1 1 image 708 401 rgb 3 8 jpeg no 17 0 163 163 101K 12%
    I already read about ICC Profiles in the Wiki, but can't imagine that only a single application gets the colours so wrong. What's the issue here? I can only find very old posts about Acrobat Reader 7 outputting wrong colours (where it is suggested to use Acrobat Reader 5).
    Last edited by Marcel- (2015-02-21 19:15:06)

    Indeed, for me too, the colors are wrong wity Acrobat reader but correct with xpdf or ghotscript (used with ghostview). Acrobat reader is more or less a standalone application (it depends on core GNU/Linux libraries but not on external ICC profiles or fonts). So I simply assume that it is a bug in acroread. As the application is proprietary, it is not the resort of Archlinux. But do you really need acroread? Opensource PDF viewers works fine and open your file correctly.

  • Pagination of output  php code with sql code

    if one program of php including sql query
    it seems to output wrong .(means some data will be calculated sum)
    if php code output all data in one page.pagination
    it seems to output right(means some data will be calculated sum)
    if there has column of company including two companies of A and B.
    and if each page output 3 lines while A company has 4 lines in sql query,so
    the last line of A company will output in second page,
    i want to calculate A company including 4 lines sum
    how to calculate sum of company of A in second page.
    i think it will be a good interesting question of php code with sql code.
    who can solution thus question ?
    thanks !

    Hi,
    for Example:
    SELECT sum(quantity * price)
    FROM orders
    WHERE COMPANY = 'A';
    This will give you the total amount for company A.
    But remember that your example table will give no output, since you have no price column. So you must decide, what which sum to calculate.
    A sum only calculated over the quantity makes IMHO no sense, because there are apples and bananas ...
    Greetings from Hamburg
    Thorsten Körner

  • Example, How to run WebServices from C#, the easy way

    Hi,
    Anyone who visited the ByD PDI workshops may remember the WebService examples with SoapUI.
    Additionally, I want to explain another way of testing WebServices for ByD, which is IMHO way more easy
    and closer to reality.
    First of all, you need access to a ByD Studio and be able to create Solutions in there.
    Second, if you don't have a Visual Studio C# 2010 installed already, go to Microsoft's homepage and grab a free Express version there. Of course, you also have to install it
    For this example, I assume, that you want to do a 'Read' on a specific instance of your own BO.
    In this case, we call our BO MasterDataWanneBe .
    Quick guide for creating a WebService 'Read'
    1.  Create new WebService
    1.1.     Name: ReadAll
    1.1.a.  Namespace -> your soltion's namespace
    1.1.b.  Business object
    1.2.  Business Object View Name
    1.2.a.  Name = ReadAll
    1.2.b.  Select all Nodes + subnodes
    1.3.  Create u201AReadu2018 Service Operation
    1.3.a.  Name = Read
    1.3.b.  Select all nodes + subnodes
    2.  Activate WS
    3.  Create WS authentication file (.wsauth)
    4.  Add WS to authentication
    5.  Activate WSAuth (will create a view in background)
    6.  Assign created WS View + WS Workcenter
    7.  Authorize your user for this WorkCenter + View (in ByD, User Management)
    8.  Download WSDL, to for example: c:\ZAYQSY0Y_ReadAll.wsdl
    Now you have a valid WSDL, pointing your solution and we go next to the more interesting part.
    1. Start Visual Studio
    2. Create a new Solution, Type = C# Console Application; project name = BydTest
    3. Within the project explorer, right click on References, choose 'add service reference'
    4. Click 'advanced' (bottom left)
    5. Click 'Web reference' (bottom left)
    6. Enter the downloaded WSDL file as URL, example: c:\ZAYQSY0Y_ReadAll.wsdl
    7. It may happen, that there will be a security warning, just ignore it and the WSDL source should be displayed
    8. Type in name 'ReadAll' as reference name
    9. Press OK (the service 'ReadAll' will appear in the web reference list, within project explorer)
    10. Type in the following C# code
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using BydTest.ReadAll;
    using System.Net;
    namespace BydTest
        class Program
            static void Main(string[] args)
                new Program().run();
            private void run()
                BydTest.ReadAll.service service = new BydTest.ReadAll.service();
                service.Credentials = new SuperSecretCredentials();
                MasterDataWanneBeReadAllByIDQueryMessage_sync request = new MasterDataWanneBeReadAllByIDQueryMessage_sync();
                request.MasterDataWanneBe = new MasterDataWanneBeReadAllByIDQuery();
                request.MasterDataWanneBe.ID = "MYTESTID"; // assuming, one instance with this ID exists!
                MasterDataWanneBeReadAllByIDResponseMessage_sync response;
                response = service.Read(request);
                if (response.Log.Item != null) foreach (BydTest.ReadAll.LogItem log in response.Log.Item)
                    Console.WriteLine("Log: " + log.Note);
                Console.WriteLine("-------------------------------------------------------");
                if (response.MasterDataWanneBe != null)
                    // This BO has to elements: 'ID' and 'RunStartDate'
                    Console.WriteLine("My BO's ID:" + response.MasterDataWanneBe.ID);
                    Console.WriteLine("My BO's StartDate:" + response.MasterDataWanneBe.RunStartDate.ToString());
        class SuperSecretCredentials : ICredentials
            public NetworkCredential GetCredential(Uri uri, string authType)
                return new NetworkCredential("myuser", "mypassword");
    Example output, when selected ID was wrong:
    Log: No instance found for specified key
    Example output, when ID there is an existing BO instance with given ID:
    My BO's ID:E5F42697_MKIRST
    My BO's StartDate:18.05.2011 13:18:08
    To my experience, this way is rock solid and I've never had any problems.
    The two major pitfalls are:
    Problem: System.Net.WebException,  Message=Fehler bei der Anforderung mit HTTP-Status 401: Unauthorized
    Solution: Check, if you're using the correct user ID. Most likely you're using an user alias and not the real user ID (generated IDs are most often longer than the shorter aliases)
    Problem: SRT, RBAM authorization denied
    Solution: Check if WorkCenter and WebService (Dummy-)View are assigned to your user. Sometimes it helps, re-activate your complete solution within ByD Studio AND/OR right click on your solution (ByD Studio) and choose 'Update Authorizations and Access Rights'

    Really good! Thanks for sharing this!

  • Xjc generating wrong code

    Hi,
    I'm new to the world of JAXB/xjc so please be nice even if the question is stupid.
    When running xjc on a xml schema it generates java code that imports the class it defines in the same file (see below for example output). It declares the class PropertyType and also imports it! Strange?!?
    Any hints appreciated
    -Tim
    package com.kettler.reqstd.reqdef.definition;
    import javax.xml.bind.annotation.AccessType;
    import javax.xml.bind.annotation.XmlAccessorType;
    import javax.xml.bind.annotation.XmlElement;
    import javax.xml.bind.annotation.XmlType;
    import com.kettler.reqstd.reqdef.definition.PropertyType;
    @XmlAccessorType(AccessType.FIELD)
    @XmlType(name = "PropertyType", propOrder = {
    "name",
    "displayName"
    public class PropertyType {
    -----------------------------------------------

    here it is.
    regards,
    martin
    "Ravi Akella" <[email protected]> wrote in message
    news:[email protected]..
    Can you post DeploymentDescriptor.txt file.
    -- Ravi Akella.
    Martin Zach wrote:
    hi,
    sorry, i did not mention that i am using wls 4.5.2 with sp1.
    martin
    Ravi Akella <[email protected]> schrieb in im Newsbeitrag:
    [email protected]..
    It depends on the WL QL(Query Language). Can you post the
    weblogic-cmp-rdbms-jar.xml?
    -- Ravi Akella.
    Martin Zach wrote:
    hi,
    my deployment wizard generates wrong code: all custom finder methods
    are
    generated wrong. i checked the xxxPSJDBC.java files and i saw thatthe
    wizard generates the sql-statement correct but then:
    Object __WL_typeObj = __WL_fieldSQLTypes.get("null");
    i think that this is wrong! please help!
    i am developing my beans in vaj 3.02 on nt. i found another problemwhich
    belongs to the same topic, i guess:
    generated code like the following is ridiculous:
    java.lang.String __WL_stmt = " select id, partno, row from item
    where
    1=0"
    --> throws the following exception when starting Weblogic server:
    java.lang.Exception: Couldn't get ResultSetMetaData to look up fieldtypes:
    thanks for your help in advance,
    martin
    [UserDescriptor.txt]

  • Can you see what's wrong with my sql clause?

    Select afkogltri sum( afpowemng ) as yqty
        from   ( afpo inner join afko on afpoaufnr = afkoaufnr )
        into   ( d_gltri , d_wemng )
        where  afpo~matnr = wa_pir-matnr
               and year( afko~gltri ) = year( sy-datum )
        group by afko~gltri. 
    The above is my sql clause, when I do a syntax check, it said:"Comma without preceding colon (after SELECT ?)"
    Can you tell me what's wrong with this sql clause?
    Thank you very much!

    Hi,
    Select Bgltri sum( Awemng ) <b>as yqty</b> (????)
    into ( d_gltri , d_wemng )
    from afpo as A inner join afko as B
    on Aaufnr = Baufnr 
    where A~matnr = wa_pir-matnr
    and year( B~gltri ) = year( sy-datum )
    group by B~gltri.
    ENDSELECT.
    eg<b>:... INTO (f1, ..., fn</b>)
    Places the result set in the target area (f1, ..., fn). The fields of the result set are transported to the target fields fi from left to right. INTO (f1, ..., fn) is allowed only if a list with n elements is also specified in the SELECT clause.
    <b>If the result of a selection is a table, the data is retrieved in a processing loop introduced by SELECT and concluded by ENDSELECT. The processing passes through the loop once for each line read. If the result is a single record, the closing ENDSELECT is omitted.</b>
    Example
    Output a list of all airlines (with short description and name):
    TABLES SCARR.
    DATA:  CARRID   LIKE SCARR-CARRID,
           CARRNAME LIKE SCARR-CARRNAME,
    SELECT CARRID CARRNAME
           INTO (CARRID, CARRNAME)
           FROM SCARR.
      WRITE: / CARRID, CARRNAME.
    ENDSELECT
    Thanks & Regards,
    Judith.

  • Different pages output

    for example:
    <?php
    create table testtable (
    company varchar2(6),
    order_number number(4),
    item_id number(4),
    quantity number(8),
    item_desc varchar2(16)
    insert into testtable values ('A',1001,1,10,'apple');
    insert into testtable values ('A',1001,2,20,'banana');
    insert into testtable values ('A',1002,2,50,'banana');
    insert into testtable values ('B',1002,1,30,'apple');
    insert into testtable values ('B',1003,3,60,'orange');
    insert into testtable values ('B',1004,3,50,'orange');
    commit;
    Table Test DATA
    company order_number item_id quantity item_desc
    A 1001 1 10 apple
    A 1001 2 20 banana
    A 1002 2 50 banana
    B 1002 1 30 apple
    B 1003 3 60 orange
    B 1004 3 50 orange
    $con = oci_connect("apps","apps","prod") or die("Unable to connect oracledatabase");
    $sql = "select * from testtable";
    $result = oci_parse($con,$sql);
    oci_execute($result);
    echo "<table border = 1>";
    echo "<td>COMPANY</td>";
    echo "<td>ORDER_NUMBER</td>";
    echo "<td>ITEM_ID</td>";
    echo "<td>QUANTITY</td>";
    echo "<td>ITEM_DESC</td>";
    $totalcomany = 0;
    while ($rows = oci_fetch_array($result,OCI_BOTH)) {
    if((isset($l_company) and $l_company != $rows['COMPANY']) or empty($result)) {
    echo "<tr bgcolor='#CCFFCC'>";
    echo "<td colspan= 3 align='center'>".$l_company."</td>";
    echo "<td >".$totalcomany." </td>";
    $totalcomany = 0;
    echo "<td > </td>";
    echo "</tr>";
    $l_company = $rows['COMPANY'];
    echo "<tr>";
    echo "<td>".$rows['COMPANY']."</td>";
    echo "<td>".$rows['ORDER_NUMBER']."</td>";
    echo "<td>".$rows['ITEM_ID']."</td>";
    echo "<td>".$rows['QUANTITY']."</td>";
    echo "<td>".$rows['ITEM_DESC']."</td>";
    $totalcomany = $totalcomany + $rows['QUANTITY'];
    echo "</tr>";
    echo "</table>";
    ?>
    how to make above example output in different pages ?
    thanks!

    Hi,
    I cannot believe that.
    If you really want to get good answers, you should:
    1. Do not ask the same questions in different threads.
    2. Omit those nasty answers with only "thanks a lot" as content.
    3. Avoid double postings.
    4. Do not expect ready solution.
    5. Do expect hints to work with, while working on an own solution and learn.
    6. Do not expect that everyone is reading your postings around the clock.
    Remember that it is really hard to follow a discussion, if it is fragmented into many threads, instead of having only one clear discussion thread.
    Greetings from Hamburg
    Thorsten Körner

Maybe you are looking for

  • Loops not playing right in GB3

    I had a project I had created in GB2, and recently needed to open it and do some more stuff to it for a new project. The odd thing is, a couple of the loops (midi) that worked fine, play with the wrong sound now in GB3. For instance, Mellow Latin Con

  • How can i transfer a field value in the main report to its sub-report?

    <p><font face="Arial" size="2">How can i transfer a field value in the main report to its sub-report?</font></p><p><font face="Arial" size="2">Please eloberate with example if possible!</font></p><p><font face="Arial" size="2">Thanks...</font></p><p>

  • Can i install firefox without IE? My IE is not working.

    I want to instal Firefox on my pc because my IE is down. My internet is working fine. Can I do it without IE? == Today == == User Agent == Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB6.4; .NET CLR 1.1.4322; InfoPath.2)

  • Placeholder smartshapes as buttons?

    In Captivate 7 is there a way to be able to create Placeholder Smart Shapes as buttons on master slides so that advanced actions can be attached to them? I can see that you can do it with Standard Objects, but the 'Use as button' option doesn't seem

  • Setting preview images for retina mac book pro?

    I love the new retina mac book pro. I have set the screen size to a higher resolution howver I was hoping that when I press spacebar to preview my images in finder that I can enlarge to a certain size. Most of the images are very small, and I have to