oracle-sqldeveloper

Trigger cant read the table, after being fired by the same table

时间秒杀一切 提交于 2019-12-07 21:51:46
问题 Lets say I have a table as follows-- create table employees ( eno number(4) not null primary key, ename varchar2(30), zip number(5) references zipcodes, hdate date ); I've created a trigger using the following code block create or replace TRIGGER COPY_LAST_ONO AFTER INSERT ON ORDERS FOR EACH ROW DECLARE ID_FROM_ORDER_TABLE VARCHAR2(10); BEGIN SELECT MAX(ORDERS.ONO)INTO ID_FROM_ORDER_TABLE from ORDERS ; DBMS_OUTPUT.PUT_LINE(ID_FROM_ORDER_TABLE); INSERT INTO BACKUP_ONO VALUES( VALUE1, VALUE2

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

耗尽温柔 提交于 2019-12-07 16:39:46
问题 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

SqlDeveloper: clear network alias list

泪湿孤枕 提交于 2019-12-07 14:48:15
问题 I use sql-developer to connect to several different oracle databases with several different users. The connection info is kept in a tnsnames.ora file so that when a database changes servers, I don't have to manually update all my connections to it. I recently updated my tnsnames file, and now there are 2 entries in the network alias list for each one that should be there. The 2nd entry appears to work (IE passes the test when I test the connection). However, by default, it seems to choose the

Oracle SQL Developer Problem initializing Welcome Page

旧巷老猫 提交于 2019-12-07 04:32:01
问题 I installed the Oracle Sql developer but I am not getting the startup page. A JavaFx error is encountered. How can I solve this problem? 回答1: The message is quite clear, your Java Home needs the JavaFX engine/feature/jars for this page to work. We have several pages that use Java FX to render visualizations - the Welcome Page, Instance Viewer, and Real Time SQL Monitoring are the big ones. Make sure you have running Oracle Java 8 JDK. I'm guessing you're running Open JDK - which we

Is there an easy way to backup Oracle SQL Developer's User Snippets?

陌路散爱 提交于 2019-12-07 02:50:36
问题 I love Oracle SQL Developer so I find myself using it a lot to complete my daily tasks. The thing is that my collection of custom snippets only keeps growing so I though it'd be interesting to learn how to backup them. Before asking blindly I did a bit of work trying to figure out how. I've performed a search within the application's folder by "snippet" and found the following file: oracle.sqldeveloper.snippet.jar which quite probably contains my beloved pieces of code. I could just save that

Sql Developer connector to Sql Server 2012 - error “Vendor code 207”

安稳与你 提交于 2019-12-07 01:58:38
问题 I am trying to connect from Sql Develper 4.0.3.16 to Sql Server 2012, with jTDS connector jtds-1.3.1.jar. OS: Ubuntu 14.04 Java: ~$ java -version java version "1.7.0_72" Java(TM) SE Runtime Environment (build 1.7.0_72-b14) Java HotSpot(TM) 64-Bit Server VM (build 24.72-b04, mixed mode) In the create connection window, when I test the connection it is successful. When I open the connection I can see all the databases. When I try to open a database that I am supposed to have a permission to

Accessing a table without specifying the schema name

痞子三分冷 提交于 2019-12-06 21:32:17
问题 I have a schema called GBO_ARC_SCHEMA , in which I have one table called TEST_EMP , and I have two users say USER_A and USER_B . First I connected to USER_A and fired below query select count(*)from TEST_EMP; count ----- 20 After that I connected as USER_b and fired below query but it is giving an error, saying that table or view does not exit select count(*)from TEST_EMP; But if I use scma.object name it is allowing me to query like below select count(*)from GBO_ARC_SCHEMA.TEST_EMP; but as

SQL Developer error Unable to find Java Virtual Machine [duplicate]

China☆狼群 提交于 2019-12-06 19:27:06
问题 This question already has answers here : How to change settings for SQL Developer to correctly recognize current version of SDK (11 answers) Closed 5 years ago . After installing Oracle 11g client, when I tried to run SQL Developer it's asked me to give it java.exe path. As I didn't know I gave it the wrong path to program files java installation. Which I later found out that I should have given the path to java.exe inside oracle folder. Now every time I run it doesn't ask me for java.exe

Script output to file when using SQL-Developer

孤街浪徒 提交于 2019-12-06 18:31:19
问题 I have a select query producing a big output and I want to execute it in sqldeveloper, and get all the results into a file. Sql-developer does not allow a result bigger than 5000 lines, and I have 100 000 lines to fetch... I know i could use SQL+, but let's assume I want to do this in sqldeveloper. 回答1: Instead of using Run Script (F5) , use Run Statement (Ctrl+Enter) . Run Statement fetches 50 records at a time and displays them as you scroll through the results...but you can save the entire

Grant UTL_HTTP permission in PLSQL

邮差的信 提交于 2019-12-06 13:42:58
问题 I would like to get HTML content from a certain webpage in my function. I read I can do it with the UTL_HTML package in PLSQL. So I made the following code in the project: v_webcontent := utl_http.request(v_weblink); Here the v_webconent and v_weblink are declared earlier. running this in de function gives an PLSQL exception: PLS-00201: identifier 'UTL_HTTP' must be declared I guess this problem is because the package isn't available (from this link: same error message). I followed the advice