oracle-sqldeveloper

Unwanted sign on each line of worksheet

感情迁移 提交于 2019-12-30 08:50:08
问题 I don't know what the hotkey I accidentally clicked, but this «¶ looking sign appeared on every line of code, and there are grey dots instead of spaces in the code. How can I get rid of those characters? 回答1: Assuming this is SQL Developer, go to Tools->Preferences (or on Mac, find that under the SQL Developer menu). Expand the Code Editor section and click on Display. Untick "Show whitespace characters" (second checkbox in the list). You can check for defined shortcuts under Preferences, in

ORA-01799: a column may not be outer-joined to a subquery

半城伤御伤魂 提交于 2019-12-30 05:46:21
问题 Here is my query SELECT COUNT(C.SETID) FROM MYCUSTOMER C LEFT OUTER JOIN MYCUSTOPTION CO ON (C.SETID = CO.SETID AND C.CUST_ID = CO.CUST_ID AND CO.effdt = ( SELECT MAX(COI.EFFDT) FROM MYCUSTOPTION COI WHERE COI.SETID = CO.SETID AND COI.CUST_ID = CO.CUST_ID AND COI.EFFDT <=SYSDATE ) ) and here is the error message that I am getting.. What am I doing wrong??? 回答1: you can rewrite that by pushing the sub query so that its not outer joined: select Count(C.setid) from mycustomer C left outer join

How to export clob field datas in oracle sql developer

我们两清 提交于 2019-12-30 04:01:08
问题 How to export clob field data's in oracle sql developer. Currently clob field data's can't export in oracle sql developer. 回答1: If you don't want to (or can't) export and import your data, and really want it as a set of insert statements, you can use SQL Developer's built-in formatting tools to automatically split your CLOBs into multiple chunks that are small enough to be valid as string literals, and then spool the result to a file: spool clob_export.sql select /*insert*/ * from your_table;

How to transpose column into row in oracle sql 11G

眉间皱痕 提交于 2019-12-29 09:16:09
问题 I need to convert column into row for the below select column_name from all_tab_cols where table_name='TABLE_NAME' ; COLUMN_1 COLUMN_2 COLUMN_3 COLUMN_4 COLUMN_5 COLUMN_6 COLUMN_7 Tried using pivot operator/clause , i need to mention all the column names for the table if the table contain more number of column it wouldnt be possible to mention in the pivot function in in clause, select * from ( select column_name from all_tab_cols where table_name = 'TABLE_NAME' ) pivot ( min(column_name) for

Getting an error while executing the procedure from sql developer

眉间皱痕 提交于 2019-12-25 18:21:06
问题 Can any one please help create or replace PROCEDURE greetings IS BEGIN dbms_output.put_line('Hello World!'); END; 回答1: There's no error for syntax, but if you ask for getting a result(to message with greeting) , apply serveroutput on before you execute your procedure : SQL> set serveroutput on; SQL> exec greetings; Hello World! PL/SQL procedure successfully completed. 来源: https://stackoverflow.com/questions/47180770/getting-an-error-while-executing-the-procedure-from-sql-developer

How to export parsed data from Python to an Oracle table in SQL Developer?

情到浓时终转凉″ 提交于 2019-12-25 08:25:24
问题 I have used Python to parse a txt file for specific information (dates, $ amounts, lbs, etc) and now I want to export that data to an Oracle table that I made in SQL Developer. I have successfully connected Python to Oracle with the cx_Oracle module, but I am struggling to export or even print any data to my database from Python. I am not proficient at using SQL, I know of simple queries and that's about it. I have explored the Oracle docs and haven't found straightforward export commands.

Returning 1 or 0 in specific SQL query

对着背影说爱祢 提交于 2019-12-25 07:06:09
问题 I have three columns in the table MYTABLE (ID, NUM, NAMES). There is a column NAMES. I need to check on NAMES column to see if the first name is JACK or BRUCE and the corresponding NUM column = 0. If the match is found, return 1 else 0. ID NUM NAMES 1 1 'TOM' 2 1 'MIKE' 3 0 'JACK' 4 1 'MICKY' 5 0 'BRUCE' I've came up with the following query: select * case NAMES in ('JACK', 'BRUCE') and NUM=0 then 1 else 0 end as MYNAMES from MYTABLE; That does not work unfortunately. 回答1: This works

why dbms_job.submit doesn't work while the same code work with execute immediate?

送分小仙女□ 提交于 2019-12-25 04:51:13
问题 This is the frist time that I am going to use dbms_job.submit. The following piece of code doesn't work: declare i_job_no BINARY_INTEGER; begin dbms_job.submit(JOB => i_job_no, what => 'declare x number; begin x := f_threads(''my_program'', '|| 6058883 ||' , '|| 2 || '); end;', next_date => sysdate); dbms_output.put_line(i_job_no); end; but the same thing works fine with execute immediate. Can anyone help?! > declare i_job_no BINARY_INTEGER; begin execute immediate 'declare x number; begin x

why dbms_job.submit doesn't work while the same code work with execute immediate?

独自空忆成欢 提交于 2019-12-25 04:51:08
问题 This is the frist time that I am going to use dbms_job.submit. The following piece of code doesn't work: declare i_job_no BINARY_INTEGER; begin dbms_job.submit(JOB => i_job_no, what => 'declare x number; begin x := f_threads(''my_program'', '|| 6058883 ||' , '|| 2 || '); end;', next_date => sysdate); dbms_output.put_line(i_job_no); end; but the same thing works fine with execute immediate. Can anyone help?! > declare i_job_no BINARY_INTEGER; begin execute immediate 'declare x number; begin x

Is Schema in Oracle is equivalent to Database in Microsoft SQL Server?

偶尔善良 提交于 2019-12-25 04:15:42
问题 I am new to Oracle database and I wanted to create a database in Oracle. I followed this link to create a database: http://www.fehily.com/books/createdb/createdb_oracle_11g_2.html In Microsoft SQL Server, when we create a database, we use the create database command and the database creation is instantaneous [within fraction of seconds], but the Database Tool as described in link above took couple of minutes to create the database. Is database creation in Oracle this much slower? Searching