473,657 Members | 2,461 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to make simple calculation in oracle

1 New Member
i'm student from malaysia need some guide to solve my problem in oracle. my problem is how to make simple calculation in oracle. for example to make addition in two data. in PHP i only paste the script in source code by in the oracle i did not know how to paste teh script. your answer important for me because the due date for my project is tomorrow. pleees... i hope your coorporation
Nov 9 '06 #1
2 6156
savannaheyz
4 New Member
I did not know Oracle can do calculations... but i know 10g has a very detailed help forum on the oracle website.
Nov 13 '06 #2
pragatiswain
96 Recognized Expert New Member
If you don't store or retrieve data from Oracle DB.
There is other way to do calculations using dummy tables if you provide the operands.

-- Shows current date with time
select sysdate from dual;
-- Shows current date
select trunc(sysdate) from dual;

-- Shows date 20 days back
select trunc(sysdate) - 20 from dual;
-- addition
select 20 + 30 from dual;
-- multiplication
select 20 * 30 from dual;
and so on.
Please go to following site for more details.
http://www.oracle.com/technology/tech/blaf/specs/commonformats.h tml#math

Hope this helps.
Nov 17 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
6706
by: channa_s | last post by:
Hi, I would be very grateful if anyone could help me with the following. I want to create a SIMPLE distributed database. It is as follows: There is a institution which has branches all over the country offering
2
9171
by: Cherrish Vaidiyan | last post by:
Hello all, A warm Xmas greetings to all. I have a small problem with starting up the database. Here my strategy. I have installed Oracle 9i R 2 on Red Hat 9. i created two database on this system. And the two datasbe is working perfectly. Now i needed another RH9 system to work on Oracle 9i. So I was guided to copy the oracle home folder and that the oracle will be up for work. I even got such a response from Google Group. I copied...
2
2078
by: nsd | last post by:
HI ALL, HERE I HAVE MADE USE OF SAME CURSOR DECLARATIONS AND USAGE IN THE FOLLOWING TWO DB2 CODES . BUT I AM GETTING AN ERROR IN THE FIRST CASE i.e CURSOR IN A SIMPLE BLOCK. SO I HAVE A QUESTION... CAN WE MAKE USE OF CURSORS IN A SIMPLE BLOCK?
4
3268
by: Michiel Alsters | last post by:
Hello everybody, I hope anybody can help me. I'll try to give a brief overview of my problem. I have running a program that performs a heavy calculation. To give the user feedback what the program is doing I show a window which contains a progress bar and a label. At some point during the execution the state of the calculation is changed, so I want to let the user know this. I have placed the creation of the form in a seperate thread...
8
4238
by: rdavis7408 | last post by:
I am attempting what I would think would be a simple calculation of the cost of traveling a single mile. But I can not figure this out. The following is my script. Any help would be appreciated. I want the user to enter the price per gallon in one textbox, the miles per gallon in the next textbox and then press the button and get the cost per gallon by dividing the price per gallon by the miles per gallon.
7
43892
by: carterweb | last post by:
This is how I do it now. 1. Determine the dimensions of the rectangle. 2. Set a my font size to a fixed maximum size. 3. Apply the font my string and measure the string using the graphics object. 4. If string size is less than the size of the rectangle, we are done.
3
2562
by: zombiechewtoy | last post by:
I'm having trouble making an ODBC connection using VB.NET 2005. I have tried nearly every connection string found on connectionstrings.com, in almost every format I can think of. I have tried both of the following drivers, as well. Oracle ODBC Driver (version 8.01.05.00) Microsoft ODBC for Oracle Basically, I end up with the same generic error no matter what I try. Here's my code. Try
4
1600
by: TonyJ | last post by:
Hello! Assume I have the two classes Test1 and Test2. They are very similar. Test1 initialize the instance variable in the C-tor but Test2 initialize the instance variable without using the C-tor. Both classes can be seen below. In this simple example it doesn't matter because Test1 is the same as Test2. Do you agree with me.
12
2541
by: brossyg | last post by:
I have a very simple price times quantity calculation. The input is STWCORQuant: <input name="STWCORQuant" class="contactitalicbold" id="STWCORQuant" onChange="javascript:STWCORPrice();" value="0" size="8" style="text-align: right; font-family: ver"> And the fucntion is STWCORPrice(): <script language="javascript" type="text/javascript">
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8823
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8726
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8603
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6163
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4151
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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 we have to send another system
2
1604
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.