ORA-01013 user request cancel of current operation
Question
Application Type
Reactive

Ora-01013 User request cancel of current operation error occurs while doing calculations with bulk records using Advanced SQL. There are 2 tables, One should be compared with other one using the date column. Table 1 has integer column instead of date. So, I need to concat multiple integer columns to form a date and then need to compare with date column in Table 2. Later need to do some arithmetic operation to get the summed value. Can somebody help me to find the better solution?

You can use NewDate(Integer, Integer, Integer) function to build your date:

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Logic/Built-in_Functions/Date_and_Time

What do you mean with summed value? Day difference between dates? You can check the functions in the link above. Use DiffDays(DateTime, DateTime) if you want to calculate the days difference.

Hi @José Gonçalves

    Actually, When I compare values from two different tables I'll get a list of values which will be summed after.

To sum a list of values, put that list in a For Each and sum each value to a total variable. Is that what you need?

Hi @José Gonçalves ,

     I need to implement it in Advanced SQL not using OS Widgets.


Thanks in advance!

Maybe something like this, saving the sum in some particular date:

INSERT INTO Table_B (Price, Date)

SELECT SUM(Price), getdate() 

FROM Table_A

Hi @José Gonçalves,

      Ok, I'll try it. Thanks for your quick response.

You can also sum outside the SQL and pass the total value as an input parameter.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.