Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> SQL Help, Please!

SQL Help, Please!

From: Jane Gao <JGao_at_kalgold.com.au>
Date: Fri, 26 May 2000 07:50:45 +0800
Message-Id: <10508.106800@fatcity.com>


This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible.

------_=_NextPart_001_01BFC6A4.0C163482
Content-Type: text/plain

Hi, Gurus, Could anyone help me with this problem(we are running on Oracle 7.3.4):

I have a table with the following fields and data:

DateOP		Tons
------------	-------------
01/05/2000	4.5
02/05/2000	3.5
03/05/2000	2
04/05/2000	4

I want to write a single SQL to achieve accumulated 'Tons' results like this:

DateOP		ACC_Tons
------------	-------------
01/05/2000	4.5
02/05/2000	8
03/05/2000	10
04/05/2000	14

Thanks in advance.
Jane Gao
Senior Application Support Analyst
Kalgoorlie Consolidated Gold Mines



> * Phone : (08) 9022 1129
*Fax		:  (08) 9022 1149

> *Address : PMB 27
KALGOORLIE WA 6430
> *E-mail : jgao_at_kalgold.com.au
>
>

------_=_NextPart_001_01BFC6A4.0C163482
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 5.5.2448.0">
<TITLE>SQL Help, Please!</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2 FACE=3D"Arial">Hi, Gurus, Could anyone help me with = this problem(we are running on Oracle 7.3.4):</FONT> </P>

<P><FONT SIZE=3D2 FACE=3D"Arial">I have a table with the following = fields and data:</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">DateOP&nbsp; = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tons</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">------------&nbsp;&nbsp;&nbsp; = -------------</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">01/05/2000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.5</FONT> <BR><FONT SIZE=3D2 =
FACE=3D"Arial">02/05/2000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.5</FONT> <BR><FONT SIZE=3D2 =
FACE=3D"Arial">03/05/2000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2</FONT> <BR><FONT SIZE=3D2 =
FACE=3D"Arial">04/05/2000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4</FONT> </P>

<P><FONT SIZE=3D2 FACE=3D"Arial">I want to write a single SQL to = achieve accumulated 'Tons' results like this:</FONT> </P>

<P><FONT SIZE=3D2 FACE=3D"Arial">DateOP&nbsp; = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ACC_Tons</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">------------&nbsp;&nbsp;&nbsp; = -------------</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">01/05/2000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.5</FONT> <BR><FONT SIZE=3D2 =
FACE=3D"Arial">02/05/2000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8</FONT> <BR><FONT SIZE=3D2 =
FACE=3D"Arial">03/05/2000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10</FONT> <BR><FONT SIZE=3D2 =
FACE=3D"Arial">04/05/2000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 14</FONT> </P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Thanks in advance.</FONT>
<BR><B><FONT SIZE=3D2 FACE=3D"Tahoma">Jane Gao</FONT></B>
<BR><B><FONT SIZE=3D2 FACE=3D"Tahoma">Senior Application Support =
Analyst</FONT></B>
<BR><B><FONT SIZE=3D2 FACE=3D"Tahoma">Kalgoorlie Consolidated Gold = Mines</FONT></B>
<BR><B><FONT SIZE=3D2 =
FACE=3D"Arial">---------------------------------------------------------=
------------------</FONT></B>

<BR><FONT COLOR=3D"#000080" FACE=3D"Wingdings">(</FONT><B></B><B><FONT = SIZE=3D2 FACE=3D"Arial"> Phone :&nbsp; (08) 9022 1129</FONT></B> <BR><FONT COLOR=3D"#008000" FACE=3D"Wingdings">.</FONT><B></B><B><FONT = SIZE=3D2 FACE=3D"Arial">Fax&nbsp;&nbsp;&nbsp; = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :&nbsp; (08) 9022 = 1149</FONT></B>
<BR><FONT COLOR=3D"#FF0000" FACE=3D"Wingdings">+</FONT><B></B><B><FONT = SIZE=3D2 =
FACE=3D"Arial">Address&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = :&nbsp; PMB 27</FONT></B>
<BR><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 = FACE=3D"Arial">&nbsp;&nbsp;&nbsp; KALGOORLIE&nbsp; WA&nbsp; = 6430</FONT></B>
<BR><FONT COLOR=3D"#0000FF" FACE=3D"Wingdings">*</FONT><B></B><B><FONT = SIZE=3D2 FACE=3D"Arial">E-mail :&nbsp; jgao_at_kalgold.com.au </FONT></B> Received on Thu May 25 2000 - 18:50:45 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US