oracle-sqldeveloper

Oracle Delete Statement: how many rows have been deleted by cascade delete

跟風遠走 提交于 2019-12-06 11:55:37
I'm executing a statement like DELETE FROM USER WHERE USER_ID=1; In SQLDeveloper. As the user is referenced in many tables (for example the user has an order, settings, ...) we activated ON DELETE CASCADE so that we do not have to delete each and every row manually. However while developing we are interested to know how many rows and and in which tables are "automatically" deleted by cascade delete. Is there any way to find this out. Either by SQL-Statement, directly in sqldeveloper from a logfile or any other idea? whilst this is not possible with sql%rowcount, it is possible if you write

How to connect to Azure Oracle 12c Database using sqlplus or sql developer cloud connection

五迷三道 提交于 2019-12-06 11:50:20
问题 I have 2 VM in azure one is a DB server and the other is a web server. I can get remote desktop connection for both these servers and web server can connect to Database wih sqlplus user/password@internal_network_ip:port/sid But however I cannot connect to Cloud DB from my local system. I tried sqlplus user/password@internal_ip:8552/sid ORA-12170: TNS:Connect timeout occurred sqlplus user/password@xxxx.something.net:8552/sid -- oracle port ORA-12170: TNS:Connect timeout occurred sqlplus user

Querying Oracle 11g multidimensional cube from sqldeveloper

↘锁芯ラ 提交于 2019-12-06 11:39:00
Im new to oracle multidimensional models... I have followed the "Creating a Multidimensional Model" 15 min Oracle tutorial. Tutorial Link Note: This tutorial use sql developer data modeler. I would like to know how to query the created data cube using SQL Developer (I.E. using regular SQL DML statements). Every time I look for information online I end up getting links on how to use the Oracle Analytic Workspace Manager. Why? I would like to just build the cube and query it without having to make use of the Oracle Analytic Workspace Manager. I would appreciate if somone could let me know if I

how do I read a local file in SQL Developer?

心已入冬 提交于 2019-12-06 11:36:00
I want to read a file on my local machine that contains query parameters when I execute a query in Oracle SQL developer. The examples that I've found on the web so far are inadequate. I keep getting "ORA-29283: invalid file operation" errors when I execute the below code: CREATE DIRECTORY SAMPLEDATA2 AS 'C:'; GRANT READ, WRITE ON DIRECTORY SAMPLEDATA2 TO PUBLIC; declare f utl_file.file_type; s varchar2(200); c number := 0; BEGIN f := utl_file.fopen('SAMPLEDATA2','sample2.txt','R'); loop utl_file.get_line(f,s); dbms_output.put_line(s); c := c + 1; end loop; exception when NO_DATA_FOUND then utl

Laravel dosen't connect with Oracle

懵懂的女人 提交于 2019-12-06 09:26:19
问题 I'm using yajra/laravel-oci8 for Oracle connection with laravel. But I couldn't connected to Oracle, from my client PC to Server. showing this error: I'm using this code in database.php: 'oracle' => array( 'driver' => 'oracle', 'host' => '192.168.152.189',// this is my server IP 'port' => '1521', 'database' => 'ocp', 'username' => 'ocpl', 'password' => '123456', 'charset' => 'AL32UTF8', 'prefix' => '', 'port' => 1521 ), But I'm connected with Sql Developer. see the Sql-Developer Property: 回答1

sql oracle ignore holidays

旧巷老猫 提交于 2019-12-06 07:15:44
问题 I am using this code to calculate the difference between two dates ignoring weekends: SELECT To_date(SYSDATE) - To_date('01.07.2014', 'DD.MM.YYYY') - 2 * ( TRUNC(Next_day(To_date(SYSDATE) - 1, 'FRI')) - TRUNC( Next_day(To_date('01.07.2014' , 'DD.MM.YYYY') - 1, 'FRI')) ) / 7 AS DAYS_BETWEEN FROM dual I have another table called table1 in which the column "date" exists (its type is "DATE") in which all dates where a holiday is are written down. Example table 1: DATES 12.06.2011 19.06.2014 09.05

How to store Japanese character in oracle DB?

江枫思渺然 提交于 2019-12-06 06:13:30
I want to store Japanese(or any language) character in one column of my oracle database table. I have used varchar2 as data type. when I am trying to insert this character(ꏕ) to this column its stored as '[]'. Don't know what to do. Need help. Note: I tried to change the data type to nvarchar2 still didn't work. https://translate.google.co.in/?hl=en&tab=wT#auto/en/Kinj%20A%20%CC%88%EA%8F%95%20%C9%82%20%C8%82%20%C4%82%20%E6%82%A9%0A%ED%82%A9%20%C3%84%20%EA%8F%95%20%C9%82%C8%82%C4%82%20%E6%82%A9 来源: https://stackoverflow.com/questions/37117331/how-to-store-japanese-character-in-oracle-db

SQLDeveloper not starting

别来无恙 提交于 2019-12-06 05:03:04
问题 When i try to start SQLDeveloper, it is giving me the following error in command prompt: Error: This product requires a Java(TM) Platform 5.0 runtime. You are using 1.4.2-b28 from C:\j2sdk1.4.2\jre But my JAVA_HOME is set to java 6 JAVA_HOME=C:\Program Files\Java\jdk1.6.0_32 Can anyone explain what exactly to do to resolve this? 回答1: Oracle SQL Developer uses a configuration file named products.conf which is situated at your roaming directory. If you are using Windows 7 then the directory

WM_CONCAT with DISTINCT Clause - Compiled Package versus Stand-Alone Query Issue

烈酒焚心 提交于 2019-12-06 03:37:39
问题 I was writing some program that uses the WM_CONCAT function. When I run this query: SELECT WM_CONCAT(DISTINCT employee_id) FROM employee WHERE ROWNUM < 20; It works fine. When I try to compile the relatively same query in a package function or procedure, it produces this error: PL/SQL: ORA-30482: DISTINCT option not allowed for this function FUNCTION fetch_raw_data_by_range RETURN VARCHAR2 IS v_some_string VARCHAR2(32000); BEGIN SELECT WM_CONCAT(DISTINCT employee_id) INTO v_some_string FROM

Employees with higher salary than their department average? [duplicate]

女生的网名这么多〃 提交于 2019-12-06 02:16:18
This question already has answers here : SELECT every employee that has a higher salary than the AVERAGE of his department (7 answers) Closed 5 years ago . i have a table called employees which i have name, department_id and salary in it. I want to find the employees whose salary is greater than the average of their department and see their names, department_id, salary and the average salary of their department. I have written this code but it does not work. How can we fix this? Thanks in advance. SELECT name, department_id, salary, avg(salary) FROM employees GROUP BY name, department_id,