Results 1 to 8 of 8

Thread: Equation

  1. #1
    Join Date
    Aug 2008
    Posts
    464

    Unanswered: Equation

    Hi

    Feeling silly when asking, however,

    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. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    what is is "DIV"?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Aug 2008
    Posts
    464

    Red face

    DIV is Divide

  4. #4
    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. #5
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >DIV is Divide
    I see words.
    Post URL to DIV documented Oracle function.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  6. #6
    Join Date
    Oct 2002
    Location
    Baghdad, Iraq
    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. #7
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    or write it as

    ((2048*1024)/8) * 3600 total
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  8. #8
    Join Date
    Oct 2002
    Location
    Baghdad, Iraq
    Posts
    697
    Quote 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
  •