oracle-sqldeveloper

How to show comments of a column with desc operation

梦想的初衷 提交于 2020-01-10 09:43:30
问题 I want the desc table; operation to show the comments of the columns. I have seen that some people achieved this, however I could not find out how. Maybe it depends on the SQL Developer version, mine is 2.1.0.63. Database is Oracle 11g. This is what I get when doing desc table; : Desc table; Name Nullable Type ------------------- -------- ----- ID NOT NULL NUMBER(38) ITEM_ID NUMBER(38) And I would like to get something like this: Desc table; Name Nullable Type Comment ------------------- ----

How to show comments of a column with desc operation

雨燕双飞 提交于 2020-01-10 09:40:10
问题 I want the desc table; operation to show the comments of the columns. I have seen that some people achieved this, however I could not find out how. Maybe it depends on the SQL Developer version, mine is 2.1.0.63. Database is Oracle 11g. This is what I get when doing desc table; : Desc table; Name Nullable Type ------------------- -------- ----- ID NOT NULL NUMBER(38) ITEM_ID NUMBER(38) And I would like to get something like this: Desc table; Name Nullable Type Comment ------------------- ----

halt on compilation error in a sqlplus script

会有一股神秘感。 提交于 2020-01-10 06:09:07
问题 I am deploying pl/sql code using several sql files that are called with @@file . If a package got a compilation error the script continues to the end. Is there a way to stop on every compilation error? I tried WHENEVER SQLERROR EXIT SQL.SQLCODE but the script still continues. 回答1: No native sql*plus way I'm aware of. Only workarounds. Like this: 20:42:50 TEST@oars_sandbox> get scr 1 whenever sqlerror exit rollback 2 create or replace procedure my_failed_proc as 3 i number; 4 begin 5 select 1

halt on compilation error in a sqlplus script

点点圈 提交于 2020-01-10 06:07:32
问题 I am deploying pl/sql code using several sql files that are called with @@file . If a package got a compilation error the script continues to the end. Is there a way to stop on every compilation error? I tried WHENEVER SQLERROR EXIT SQL.SQLCODE but the script still continues. 回答1: No native sql*plus way I'm aware of. Only workarounds. Like this: 20:42:50 TEST@oars_sandbox> get scr 1 whenever sqlerror exit rollback 2 create or replace procedure my_failed_proc as 3 i number; 4 begin 5 select 1

Use SQL to Replace Multiple Commas in a String with a Single Comma

拥有回忆 提交于 2020-01-07 06:47:19
问题 Input: Hi,,How are you? Fine, thanks ,, , ,,,, , James,Arden. I would like to replace all consecutive commas with a single comma and a space. The output should be: Hi, How are you? Fine, thanks, James,Arden. SELECT REGEXP_REPLACE('Hi,,How are you? Fine, thanks ,, , ,,,, , James,Arden.', ',,+', ', ') FROM DUAL; I haven't tested it yet as I don't have access to the Oracle system yet. 回答1: More simple solution with same output: Hi, How are you? Fine, thanks, James, Arden. @Joseph B: Sorry I can

Column alias querying IBM DB2 using Oracle SQL developer

谁说我不能喝 提交于 2020-01-07 05:04:08
问题 I'm connected to an IBM DB2 database using Oracle SQL Developer and I'm querying several tables in order to perform an automated extraction of data. The issue here is that I can't set aliases for my results. I tried a lot of variants like adding quotes ("") ([]) ('') and it's not working. I saw several tutorials and everyone uses "AS" only, but for me it's not working. Any recommendations? Thanks! Image as example here : https://i.stack.imgur.com/5NrED.png My code is: SELECT "A"."TC_SHIPMENT

OR Database/Type in Oracle Express/SQL Developer

拈花ヽ惹草 提交于 2020-01-06 04:25:08
问题 I try to do some stuff wie object relational Databases. I have Oracle Express and the SQL Developer. Everything works fine. I can create my own, custom types and insert some rows. The problem is that it would not be display right. I think it is normally because they should be display object/types in a column... Is there a solution to display the objects in the columns? This is my code. p.s. i am from germany. ANSCHRIFT_T is a type for an address with name of the tress (Strasse) and house

Averaging a list of TIMESTAMP(6) WITH TIME ZONE times

感情迁移 提交于 2020-01-06 03:31:27
问题 I've got 2 columns in a database of type TIMESTAMP(6) WITH TIME ZONE. I've subtracted one from the other to get the time between the two timestamps. select lastprocesseddate-importeddate from feedqueueitems where eventid = 2213283 order by written desc; How can I get an average of the list of time differences I have? Here are a small sample of time differences: +00 00:00:00.488871 +00 00:00:00.464286 +00 00:00:00.477107 +00 00:00:00.507042 +00 00:00:00.369144 +00 00:00:00.488918 +00 00:00:00

Connecting SQL developer to Oracle 12c

允我心安 提交于 2020-01-06 03:03:08
问题 I am a little new at setting up this Oracle Stuff so hopefully you bear with me. I installed Oracle on my personal laptop and have verified running from the command prompt that it works fine. I connected using SYS as the user id and I was able to login fine I installed SQL developer as well How do I setup a connection from SQL developer to Oracle? I did read the manual. What are the parameters that need to be given for the connection, the user name and the password in case I need to connect

Refresh a Complex Materialized View

ぐ巨炮叔叔 提交于 2020-01-06 01:53:13
问题 I have a materialized view and I used some joins for it's statement. And now I have a refresh problem with it. It takes too long time (even more than an hour). I want to have all data but refresh last 2 day's data. Is there any solution for my problem? thanks. 回答1: To improve the performance of your query try google for "improving query performance". There are a few tips you might want to know. (or I could suggest you some if you want) IF and only if the performance of your query cannot be