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…
Tag: oracle
How to identify best Max_bucket and Seed_value for Oracle ORA_Hash function?
I am new to Oracle Hash function. I know that this function is for encryption purpose. It is actually convert a very large paragraph into one single hash value. The Ora_hash function have three different parameters: Expression Max_bucket Seed_value For the Max_bucket and seed value, the document says I can sp…
Show the names of customers that have accounts SQL Query Oracle 10G
Q1 Show the names of customers that have accounts Q2 Show the customer names with the names of the employees they deal with** Answer Q1 is a simple lookup of the cust_id in junction table has: This phrases as: select the customers that have at least one entry in the has table. When it comes to Q2: your data s…
How to I create a new column in a table and add values to it
I have to create a new column in my table called Raise that has a 20% raise from the values of the SAL column, here’s what I have so far: SELECT ENAME,EMPNO, JOB, SAL from emp ALTER TABLE emp ADD …
A query to update group of related items with their main primary key (parent keys)
I Need to update the TS_PARENT_TS_ID column with the TS_ID column(Primary Key). Using the first rowas example, see column name (TS_TERM_TYPE_NAME), You have “MAIN” directly under it is “RELATED(s)”. all of which are related to each other, hence should have the same foreign keys in colu…
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