I have two tables what I am trying to find is the ‘daily amount GBP Equivalent per day for the last three months’. For example on date ’05/01/2022 ‘ check the given amount in Payments_history table if the currency is GBP add it into total and move on to the next payment, next if the currency is in USD check
Tag: oracle
Grouping of PARTITION BY / GROUP BY only until next section to obtain a list of sections
I have a table like this: id section 1 6 2 6 3 7 4 7 5 6 and would like to obtain a grouped list that says section section_nr first_id 6 1 1 7 2 3 6 3 5 Using ROW_NUMBER twice I am able to obtain something close: section section_nr first_id 6 1 1 7 2 3 …
How to “hide” a row in Oracle SQL database but not delete it
Is there a way to “hide” a row in Oracle SQL database without deleting it, So that it is still in the database but does not show up on the webpage as a search result? For example, I want to hide a specific city in my database from being displayed in the results when searching for cities on the webpage.
CASE statement in WHERE CALUSE – Missing keyword error
I have list of products which gets renewed on monthly or yearly or both. If the renewal value is ‘M’ then the product is renewed on monthly basis. If the renewal value is ‘Y’ the the product is renewed on yearly basis. So my query is, If I choose method(M/Y) and a particular date(P_date), I want the details of products
ORA-10400 error in PL/SQL, cannot auto generate tran_no field in table using procedure
T_Acc_Details is a table for storing the account number details of a person with the given fields. I have also inputted values into the field like the following: Secondly, I created the Transaction details table in which the values are to be inserted on the basis of it being deposit or withdrawal. The table query is as follows: Furthur, this
SQL missing parenthesis when creating a table [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 2 months ago. Improve this question I’m trying to create a table for a college project, but when I run my code it tells me I am missing
Why is this CREATE command not running?
This is a part of a script which the whole script runs without errors. I followed the script and made minor changes, just by changing names, etc and discarded few commands like ‘create or replace force view’, sequences. This is one of the ‘CREATE TABLE’ commands that I edited from there. Errors came out; ORA-00907: missing right parenthesis ORA-06512: at
Data in Oracle apex
If I want to take data for today from 00:00 until currently hour how can I do it ??? I have this table datetime hourly clientchannel servicename service_count 13_02_2022 9 ***** notification 2 Answer Presuming that datetime column’s datatype is DATE (should be), then because If datetime’s datatype is VARCHAR2 (bad choice), then you should first convert it to date,
Oracle case statement not returning values for no row results
I have a simple case statement as follows: This code is designed to return ‘A_VALUE_ANYWAY’ because there is no output from the SQL. However, it does not return anything at all. Essentially, what I would like is a value being forced to return from the case statement instead of just no rows. Am I able to do that with the
SQL Oracle fusion lines with same id
Here is a simplification of my problem: I would like to have a result like this (keeping those 2 selects): Not sure how to fusion those 2 lines One ugly solution is: Answer For me it looks like a join with nvl for me: I’m not sure about your data, so probably it should be just left/right join or even