Mathematical operations

Hi all
I saw an example here that I can do this:
with t1 as (
select -3 x, 6 y from dual
union all 
select 4, 7 from dual
union all 
select 5, 8 from dual
)
select x/y s1 from t1
What if I want to do 5 /(-3*4) and 8 /(6*7), it's a way to do it?
Thank you!

A little obsession with hair gray of the mine.

The only bit of mathematics that I see here is the fact that the value a (multi) has no control.

The rest is arithmetic.

(At home with a broken shoulder, so feel even more pedantic than usual)

Tags: Database

Similar Questions

  • Tiara DAC formula invalid mathematical operation

    Hello

    I will disturb you with a quick question, maybe easy for you, but I've found a solution for my self (I am a novice in working with Diadem DAC)

    Build a schema, and when I run it I get an error (see attachment) "...". invalid mathematical operation"and I don't know what the problem is.

    Maybe I do not know how to work with the formula block, and maybe you can give me some advice.

    Please take a look at this error (see attachment) and tell me what to do.

    Normal 0 21 false false false OF X-NONE X-NONE MicrosoftInternetExplorer4 / * Style Definitions * / table. MsoNormalTable {mso-style-name : « Normale Tabelle » ; mso-tstyle-rowband-taille : 0 ; mso-tstyle-colband-taille : 0 ; mso-style-noshow:yes ; mso-style-priorité : 99 ; mso-style-qformat:yes ; mso-style-parent : » « ;" mso-rembourrage-alt : 0 cm 5.4pt cm 0 5.4pt ; mso-para-marge-haut : 0 cm ; mso-para-marge-droit : 0 cm ; mso-para-marge-bas : 10.0pt ; mso-para-marge-gauche : 0 cm ; ligne-hauteur : 115 % ; mso-pagination : widow-orphelin ; police-taille : 11.0pt ; famille de police : « Calibri », « sans-serif » ; mso-ascii-font-family : Calibri ; mso-ascii-theme-font : minor-latin ; mso-hansi-font-family : Calibri ; mso-hansi-theme-font : minor-latin ; mso-fareast-language : EN-US ;}

    HI Maria,

    It seems that you are using DIAdem 10.2. In this version, there is a limit to the name of the symbol in block f (x) of 16 characters. If you change the name it works fine (Please take a look at the attachment). This changed with DIAdem 11.0 or later.

    Referring to your second question, I'm not that I really understand the problem. Please can you explain what you would do?

    Greetings

    Walter

  • User input to JSON and mathematical operation

    Hello guys,.

    Now, I am currently building another application, and I want to use JSON as my database. There will be multiple entries (entries user, INTEGER) textfield that will be stored in JSON, so I want to apply a mathematical addition on each entry which is recorded in the JSON (total value) database, and then display it in the user interface. I also want to try this with XML, but I don't know if I could do it with XML.

    The sample application in the documentation (registration with JSON data) is not enforced with user input, but we specify the data. There is also an example of a mathematical operation of database. I still don't know the concept and how to write the code.

    Any help would be appreciated. Thank you.

    Hello
    Mathematical operations can be performed in the application itself.

    (1) create input controls, a button that will trigger the operation. Click, calculate the result, update the result field, then record the entries and result in a DB, JSON or XML file.

    (2) when the page is loaded into onCreationCompleted on the Page read handler registered values (if any) and fill the control with data.

    If you need help, please post the code you have so far and that someone may be power help with specific problems.

  • Cannot use mathematical operations on the settings defined in the model

    We use BI Publisher 11.1.1.6

    We have a report that contains a few settings entered by the user.  The model defines variables to parameters like this:

    <? param@begin:loadsch;5? >

    I can see the $loadsch parameter in a field very well, using this code in a domain: <? $loadsch? >

    Note that the parameter is given a default value.  When you use the preview function in Word template designer, things work fine.

    The problem arises when a mathematical operation on the variable $loadsch.

    When previewing in Model Builder, I can display a field with the following formula: <? 1 + $loadsch? >

    But, when you view the report on the BI Publisher server, I get very informative typical error: oracle.xdo.XDOException: java.lang.reflect.InvocationTargetException

    Looking at the server logs, I see the following error information:

    Message from the incomplete xslt._XDONFSEPARATORS: decimal: null, grouping separator: null

    Error XSL:

    Further details < line 74, column 367 >: XML-23002: internal xpath (error)

    @Line 74 == > < / _P > < _Q > < fo:inline XML: Space = "preserve" font-family = "Arial" height = "9.0pt" police-family-generic = "swiss" white-space-collapse = "false" color = "#000000" style-name = the size of the 'Normal' font = "9.0pt" > 3: < xsl: variable xdofo:ctx = xdofo:ctx2 '17' = 'wrapper' name = "fv3" > < xsl: Value-Select = "1 + xdoxslt:one ($loadsch)" xdofo:field - name = '1 + $loadsch' / > < / xsl : variable > < xsl: value-of select = "xdoxslt:ms_format_number ($_XDOXSLTCTX, xdoxslt:one ($fv3), ' #, ##0.0')" / > < / fo:inline >

    Message from oracle.xdo.XDOException: java.lang.reflect.InvocationTargetException

    More details at oracle.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1233)

    at oracle.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:279)

    at oracle.xdo.template.FOProcessor.createFO(FOProcessor.java:1973)

    at oracle.xdo.template.FOProcessor.generate(FOProcessor.java:1143)

    at oracle.xdo.servlet.RTFCoreProcessor.transform(RTFCoreProcessor.java:124)

    at oracle.xdo.servlet.CoreProcessor.process(CoreProcessor.java:494)

    ...

    Caused by: oracle.xdo11g.xqxp.XQException: XPTY0004

    Someone knows how to fix this?  How can I perform mathematical operations on the setting?

    the error may be in operation as (number + string)

    then you can try

    
    

    or

    
    

    Further detail : 23002-XML: xpath internal (mistake)

    @Line 74 ==> <_Q>3:

    sure what error occurred by ""?

    any other code exists in your report?

    Thanks for posting more details

  • Mathematical operation on tables

    Hello

    Hope someone can help me with this. How can I (add, subtract... each piece between 2 bays or several etc.) Of lets say I have a table with element (5,10,15,20) array1 and array2 with (2,4,6,8). I need to multiply 5 by 2, then 4, then 6, then 8 and then 10 2,4,6, 8... and the list continues... all enjoyed the show also showed in a new array multiplied...

    Thank you

  • Applying a mathematical operation of string data

    I am a PSU (E3631A Agilent) interfacing via GPIB. When the power supply is turned on to 12v and a device consumes current 104mA, vi reading gives a data string + 1.04485600E - 01. Now shown data are right, but I want it to appear on the front panel as 104 or 0.104 instead of exp + 1.04e format - 01. One way is to multiply by 10 and one way is to divide by 100 and maybe way to convert a simple decimal number. Any body can help me to get simple 0.104 or 104 out of the string above please.

    If this is the answer of the exact string you can use the Exp/Frac string to number function to interpret the content of the string in Double. You can then use a digital sign with the defined display format, but you want to ensure you get a rounded number. I think a '%.3f' format specifier should give you 0.104

  • How to calculate the total of a mathematical operation

    Hello everyone,

    I'm new to Essbase calculations, and I'm trying to figure out how to make a recurring calculation and store the results in a specific data point. I have two accounts:
    Volume of sales (in units) - StoreData
    Rate of work (hours) - DynamicCalc based on a specific percentage by product rate

    These two pieces of information are by product. As each product has a different rate and volume, to calculate the total number of hours required for the production of all the elements, I have to do something like the calculation below where (sales volume * wage rate) for each product:

    Total hours = SUM (sales volume * wage rate)

    It is very easy to do in relational DB, but I need help with Essbase.

    Any ideas? Thank you very much.

    M.

    You try to do something of relationship in an OLAP cube. The way to proceed is different. In Essbase, you would make the Total number of hours of calculation = sales volume * wage rate) on each product and their aggregation up to the size to get a total at different levels.

  • Reproduce a sequence of operations-DIAdem

    Hi all

    I'm new to the tiara and I explore a method of repeating a standard order of operations for groups of channels of 85-90. The task goes like this:

    Each channel group has a set of three strings, in which certain mathematical operations 7-8 are to perform as sum of two-channel, medium, find the mean quadratic value and add/subtract the results to real channels, finding the arc tan value results etc..,.

    I need to reproduce the same task for groups of channels of 85-90. I tried to use 'activate record' Mode in the Script window and tried to use the script it generates and use it in a for loop. But since the recording mode, contains the actual name of the channel instead of a reference, it is difficult to change the names of the channels individually making it heavier than the actual work. This is why I need another way to do the same.

    Any help will be much appreciated.

    Hi Subramanian,

    You just asked for the additional code calculator, here it is:

    iMax = Data.Root.ChannelGroups.Count
    FOR i = 1 to iMax
    Set Group = Data.Root.ChannelGroups (i)
    Set consolidate = Group.Channels ("load AmpHr")
    Set BChannel = Group.Channels ("AmpHr discharge")
    Set RChannel = Group.Channels.Add ("Result", DataTypeFloat64)
    Symbols = Array (A, B, R)
    Channels = Array (consolidate, BChannel, RChannel)
    Calculate the call ("R = ArcTan(B/A)", symbols, channels)
    NEXT ' I

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

  • mathematical calculation in script on each element of the array.

    Hi all

    I am trying to write the VB script in which I want to do different mathematical operation on each element of channel-specific data. For example, for each element I want to find the next two index given way and both before and after publication of the results on the basis, then it is more calculating.

    It will be very useful if someone can guide me in the execution of operation on the elements in the array inside the script of tiara, that we can do in labview using indexes in the table. There are built-in math and statistics in tiara tab analysis tool. But I want to design for my custom mathematical operation.

    Thnks

    HS

    Hi HS,

    Here is a version 10.2 tiara from what I understand ask you:

    Window = 2

    Denom = 2 * window + 1

    Threshold = 10

    Chnum = CNo("[1]/Speed")

    FOR i = 1 + ChnLength (Chnum) window - window

    Sum = 0

    FOR j = i - window to i + window

    Sum = sum + ChDX (j, Chnum)

    NEXT ' j

    Ave = sum/Denom

    IF Ave > threshold CAN

    ' do action of contingent

    END IF

    NEXT ' I

    Brad Turpin
    Tiara Product Support Engineer
    National Instruments

  • Question of Math Addition operator

    Hello

    I am trying to write a very simple mathematical equation:

    var gal_width = 100;
    var m_box_pos = 2000;
    
    var total = (gal_width+m_box_pos);
    

    When I have this display in a text element, the numbers are presented together instead of being added

    (for example: 1002000)

    I feel that edge the interpreter + as an operator of string rather than a mathematical operator.

    Replace the sign + to a - (as a test), the 2 numbers being subtracted.

    Multiplying numbers with the * operator also works as it should.

    I have tried many configerations, escaping from the operator with no luck.

    Any ideas how to get off work?

    Thank you

    There is no good reason for your addition to does not unless you put quotes around your variables that turns them into channels.

    Try this:

    var gal_width = 100;

    var m_box_pos = 2000;

    var total = (gal_width + m_box_pos);

    SYM.$('result').html (total);

    Of course, this gives: 2100

    Alert (total); give 2100.

    How you format your answer? I think that's the problem.

  • operation on a varchar colunm

    Hello

    I would like to know if it is possible to perform mathematical operations on a nvarchar2 colunm? My colunm delay is of type nvarchar2 (5) and we store delays such as: HH: mm.

    You have any tips or a function that can allow me to extract all the delays that are superior to 00:30, or for example lower at 00:30.
    SELECT
      DISTINCT RES."ID" AS "id"
    FROM
       RES
    WHERE
      RES.SITE_ID = 3
      AND   (
        trunc(RES."RECEIPT", 'DD') >= TO_DATE('27-02-2012', 'DD-MM-YYYY') AND
        trunc(RES."RECEIPT", 'DD') <= TO_DATE('28-02-2012', 'DD-MM-YYYY') AND
        RES."DELAY" <= '00:30'
      )
    ORDER BY
      1
    Thank you.
    Kind regards
    Jarod

    Hi, Jarod,

    What is the problem with what you posted?

    user539451 wrote:

    ... WHERE ...
    RES."DELAY" <= '00:30'
    

    The less than the string ' 03:00 ' 02:59 'East' string.
    The string ' 03:01 'is larger than the string ' 03:00 '.
    If res.delay is incorrect, you'll get an error, because you do not call any conversion function that can cause an error.

    Storage of the date in a VARCHAR2 column information is not a really good idea.

  • Problems with arithmetic operations

    I do mathematical operations on my tables to retrieve the average records.
    I have a table of insurance useda table of connected clients, and client.
    Now, I would like to extract the average number of incidents per year took place from the first strategy until today.

    If I run this query:

    SELECT (SUM (c.incFatti () + c.incSubiti ())) AS AVERAGE / * incFatti() is made by the customer, incSubiti() incidents suffered incidents * /.
    CLIENT c;

    I get 8, for example, I have a total of 8 incidents in my DB.
    Now, if I run it:

    SELECT ROUND (((SYSDATE - MIN (p.data_stipulazione)) / 365), 2)
    Polizza p;

    I receive 1.28, for example, a year and a few months since the creation of the first strategy until today.

    OK, 8 / 1.28 = 6.25 accidents per year and that's what I would get with a single query.
    The latter is:

    SELECT (ROUND)
    Sum (c.incFatti () + c.incSubiti ()) / / * the first query * /.
    (((SYSDATE - MIN (p.data_stipulazione)) / 365), 2) AS AVERAGE / * the second query * /.
    CLIENT c, polizza p

    But I get 31.26! When I make a mistake?

    Try

    select round (n1 / average, 2)
      from (select sum (c.incfatti () + c.incsubiti ()) n1 /* from the first query */
                                                          from cliente) c,
           ( (select ( (sysdate - min (p.data_stipulazione)) / 365) as average /* from the second query */
                                                                              from polizza))
    
  • Question number

    I am trying to add today's date, in column B, when a box is check in column A.

    What is the formula for this?

    Thank you

    Casey

    I'm not clear what you mean.  When you say 'Add' are means means 'show' or a 'mathematical operation?

    Whatever it is:

    use the checkbox and assuming the box to tick is in cell B2

    = If (B2, < WHAT to DO IF TICKED >, < WHAT to DO IF NOT CHECKED >)

    If you just want to show the date when the box is checked, then:

    = If (B2, today(), "")

  • HP first and true variable E

    HP first and true variable E

    Home view

    example 1:

    0.1 enter Sto Alpha E

    Enter 8 alpha E

    X ERROR: invalid exponent number

    Press OK

    example 2:

    0.1 enter Sto Alpha E

    8 * enter alpha E

    .8

    example 3:

    0.1 enter Sto G

    Enter alpha 8 G

    .8

    Why doesn't the first 8th?

    Thanks for the quick response.

    This means E as a variable is not consistent in the simple mathematical operations.

    Such as:

    5 b/C is ok

    5th/C not ok

    concerning

    RS

  • weird Word NaN in mac store update

    Hi there guys just went to day el capitan 10.11.3 and he has that in the download bar

    anyone has an idea what this NaN GB means its all just curious

    It means an undetermined and suggests that a division by zero or any other undefined mathematical operation has been completed during the attempt calculate the result.

    (138629)

Maybe you are looking for

  • iPhone ON

    Hello I am currently working to connect NZ, Apple authorized service provider in New Zealand as a technician. How are we eligible to become service provider ON iPhone? Thank you. Kind regards. RIMA Martin

  • Bluetooth device driver

    Hello. Where go I find Bluetooth device driver

  • Firefox won't open indicating his aready runs when it's not

    Firefox argued that his race and tells me that I have to restart my computer, I made... its still saying that his race, then I removed the battery for 5 minutes and tried again... still says his race, then I tried to uninstall... refuses to open the

  • Motorola BACKFLIP stuck on bootscreen.

    I'm starting to really hate this phone. I had nothing but problems with it and it turns me off the coast. First of all, I was unable to receive incoming calls and NOW it is stuck at the screen AT & T. Eh well first thing to blur on the beginning of t

  • Windows Vista Driver Seagate Ext. Hard drive not recognize

    Hello: I have a "push button" five years external seagate hard drive. Vista support applications for this unit - implementation and applications - but when I go to back up my hard drive to laptop (windows vista OS) may not perform the function becaus