thank you in advance for any assistance you can provide. I am having to work in Oracle SQL and one issue I’m coming across is how to use applies in SQL. Specifically, hoping someone can help me write the code ...
databaseanswers.net Latest Questions
I have 2 tables- ‘users’ and ‘department’. ‘Users’ table contains usernames along with the department they have access to. ‘Department’ table contains all department specific fields like manager, employees etc. Desired Output : I need each username along with the department ...
Table1 has these columns: country_id, location_id, street_address, city, state_province Table2 has : country_id, country_name I want to display location_id, street_address, city, state_province, country_name? I want add/append the country_name from Table2 to Table1. I can’t get it to work.
I have around 270 million rows indexed on month||id_nr and below update/delete query takes around 4 hours to complete. I was wondering if there is any other way to do update/delete which will be faster. Update Query:- update table_A set STATUS='Y' where month||id_nr in (select ...
I’m trying to list in one row using LISTAGG in Oracle, but I get the "Right Parameter" error and I don’t know why. Here is my SQL command: SELECT listagg (ODA_CdiDispositivoAcesso, ';') FROM DispositivosAcessosOcors INNER JOIN ...
I have three tables, and I join them and use where Group by – count, I could not get the countries with zero results in the output. I am still lost. Here is the SQLfiddle http://sqlfiddle.com/#!4/e330ec/7 CURRENT ...
How can I select LINK_USER_ID who has only 1 CA account and 1 SA account. There are users which have 2 CA and 1 SA or 1 CA only or 1 SA only using SQL query. NOTE: 1 LINK_USER_ID can linked ...
I have a PL/SQL procedure that consumes two input parameters of type VARCHAR2 (amount is nullable, exact_amount is just a true/false flag but Oracle does not support boolean types): amount in ...
SELECT SP.Ename FROM SALESPERSONS "SP" LEFT JOIN ORDERS AS "OD" ON SP.EmpID = OD.EmpID WHERE OD.EmpID IS NULL ORDER BY SP.Ename; I ...
staff (id, name, salary, dept) msg (dept, deptminsalary, time) Write a trigger to insert values to the msg table if the minimum salary expenditure of a department exceeds $5000.