1. Registered User
Join Date
Aug 2008
Posts
464

Hi

How can I write

((DIV(2048*1024),8)*3600) as TOTAL

or 943718400 as TOTAL

because I keep getting 'missing right paranthesis'....Would appreciate some guidance.

Regards
Last edited by shajju; 08-01-09 at 01:52.

2. Registered User
Join Date
Aug 2003
Location
Where the Surf Meets the Turf @Del Mar, CA
Posts
7,776
what is is "DIV"?

3. Registered User
Join Date
Aug 2008
Posts
464
DIV is Divide

4. Registered User
Join Date
Aug 2008
Posts
464
Please ignore...Question is too basic and insults the intelligence of the people providing answers...Done it by the way.

5. Registered User
Join Date
Aug 2003
Location
Where the Surf Meets the Turf @Del Mar, CA
Posts
7,776
>DIV is Divide
I see words.
Post URL to DIV documented Oracle function.

6. Registered User
Join Date
Oct 2002
Location
Posts
697
((DIV(2048*1024),8)*3600) as TOTAL
Well, yeah, division is done with an operator, /, and you study the docs to learn when it does integer vs. floating point, but here's how you figure out problems with parentheses:

Code:
``` (
(
DIV(2048 * 1024)
)
, 8 -- you probably meant to put this in the DIV
) * 3600
)-- oops, extra parenthesis```
Usually copying and pasting to a good text editor makes this easier. SQL developer would make life easier for you.

Post URL to DIV documented Oracle function.
DIV could be a perfectly valid UDF, so obviously you're the one who needs to do a little reading.

7. Registered User
Join Date
Jun 2004
Location
Liverpool, NY USA
Posts
2,520
or write it as

((2048*1024)/8) * 3600 total

8. Registered User
Join Date
Oct 2002
Location
Posts
697
Originally Posted by beilstwh
or write it as

((2048*1024)/8) * 3600 total
Or just 2048 * 1024 / 8 * 3600, since both division and multiplication have the same level of precedence and are left-associative.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•