473,503 Members | 3,884 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Looking for some help on a simple command....

(Im a newbie at oracle)
I have a field in my database called "gamesplayed" and I would like that to
display the total of 'opwin' & 'oplost' automatically. Sort of like adding a
formula to a field in excel, but I cant figure out how to do this or if its
even possible.

example:

'opwin' 9
'oplost' 19
'gamesplayed' 28 (i would like this field to update automatically)
I am thinking I just add the command "select sum(opwin+oplost) from
gametable;" to 'gamesplayed', but how?
Andrew
Jul 19 '05 #1
1 1806

<mo***@hotmail.com> wrote in message
news:Yb****************@read1.cgocable.net...
(Im a newbie at oracle)
I have a field in my database called "gamesplayed" and I would like that to display the total of 'opwin' & 'oplost' automatically. Sort of like adding a formula to a field in excel, but I cant figure out how to do this or if its even possible.

example:

'opwin' 9
'oplost' 19
'gamesplayed' 28 (i would like this field to update automatically)
I am thinking I just add the command "select sum(opwin+oplost) from
gametable;" to 'gamesplayed', but how?
Andrew


You can create a view or use the sql:

select opwin, oplost, (opwin+oplost) gamesplayed from gametable;

Unless you built the table with the " around the field names you don't need
them.

Jim
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
1629
by: Charles Law | last post by:
Hi guys A bit of curve ball here ... I have a document (Word) that contains a series of instructions in sections and subsections (and sub-subsections). There are 350 pages of them. I need to...
7
11740
by: mydejamail | last post by:
I am looking for a script that generates PIN Numbers. Is there one available somewhere out there? I don't mind algorithms if they will be easy to implement in PHP. Regards
2
1558
by: dik mus | last post by:
Hi, My application can show employee pictures that are on the local hard drive. In case the picture is not there, i want to get it from my (anonymous) ftp site. The application should run...
8
2282
by: Eric_Dexter | last post by:
I was looking for a simple way to load a simple python program from another python program. I tried os.system(cabel) The file name is cabel.py a csound instrument editor.. The error I am...
11
2944
by: chsalvia | last post by:
I've been programming in C++ for a little over 2 years, and I still find myself wondering when I should use polymorphism. Some people claim that polymorphism is such an integral part of C++,...
3
1950
by: richk | last post by:
I am looking for a way to determine the screen type when I am checking out a laptop that has no HDD installed. I am looking for something I can compile to run under a DOS or windows 98 command...
13
1062
by: Avi | last post by:
Hi, Is there a UNIX C system command that will let me copy a file? I am looking for something similar to "cp" that can be called within a C program. I know of the "link" system call but this...
6
2308
by: beantaxi | last post by:
Hello all, I'm looking for a very simple code analysis tool. I have a large codebase to analyze, and all I really need to do is to find all uses of all methods in a few interfaces. Many tools...
1
133
by: | last post by:
(Im a newbie at oracle) I have a field in my database called "gamesplayed" and I would like that to display the total of 'opwin' & 'oplost' automatically. Sort of like adding a formula to a...
0
7258
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7313
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5558
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4987
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3156
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3146
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1489
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
720
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
366
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.