Skip to content

Tag: oracle

Binding dates to SQL in Python for cx_Oracle

I am using the following query to select logs fro a logs table. I have the following dictionary of parameters: and executing the query as follows : Now the problem is I am not getting any values for this date range. But if I execute the query in Oracle, by specifying the dates, it is working. What is wrong he…

SQL Update with COUNT(*) less than 2

I have two tables to query from. An “Order_Details” table and a “Product” table. I need to COUNT(*) the amount of times each product has been ordered(identified by unique a “ORDER_ID”), from the “Order_Details” table. If the amount of times a product has been or…

sql query to count and display full name

So I am very confused by this query to display teachers’ full name. I have used teacher_name ||’ ‘|| teacher_lastname, but when I try to do so for the students, something happens. I am trying to get …

Split and compare two Strings in Oracle SQL

I have a table with three columns structured as followed: Now I would like to perform an Oracle-SQL-query which gives me the edit-pattern of the two strings left and right. The result should be as followed: Al my tries with REGEX_SPLIT and CONNECT BY were not successful. Do you have any ideas how to solve tha…

Oracle Select max where a certain key is matched

i’m working with oracle, plSql, i need to query a table and select the max id where a key is matched, now i have this query It’s displaying this data If i remove the ID from the query, it displays the distinct keys (in the query i use the alias KIES because keys was in blue, so i thought it

Show jobs over 3 BUSINESS DAYS old

Can someone offer any help on how I would amend the SQL code to show jobs that are over 3 BUSINESS DAYS old? I have the following code: This shows me all jobs that have been logged more than 3 days ago based on the current date. However I want this to only show me the jobs that have been