Feed aggregator

function-based index issue

AskTom - Hot Questions - Fri, 07/06/2018 - 00:00
Hi Tom, I have table with 1 755 001 rows and functional-based index as follows: <code> create table OC_YKB.TAB_TEST3 (guid number(16), pan varchar2(19 byte)); create sequence oc_ykb.sq_test3; INSERT /*+ APPEND */ INTO OC_YKB.TAB_TEST3 sele...

Equality check and TO_NUMBER bug with trailing CHR(0) on SUBSTR function

AskTom - Hot Questions - Fri, 07/06/2018 - 00:00
Hello Tom ! It seems that Oracle has a bug in TO_NUMBER function on strings with trailing CHR(0). For example it happens when SUBSTR function is used for which there is not defined length parameter. Example: <code>select substr(session_id...

Using identity columns in Oracle 12c

AskTom - Hot Questions - Fri, 07/06/2018 - 00:00
What is the difference between using sequence.netxval as DEFAULT value in a column or check the column as identity? Please, check the following scenarios: <b>SCENARIO 1:</b> CREATE TABLE USER1.TEST_TABLE ( ID NUMBER GENERATED BY DEFAULT AS I...


AskTom - Hot Questions - Thu, 07/05/2018 - 00:00
Hi Team, Could you please have a look at below use case and help to form SQL/PLSQL using which I can get the below report.. Table: order_country : holds order id and country its belong. There can be 100 and more countries in that but for sampl...

How to manage disable/enable Maximize/Resize in oracle forms?

AskTom - Hot Questions - Thu, 07/05/2018 - 00:00
i need to manage disable/enable Maximize,Resize button by programming in oracle mdi parent forms in 10g. Please give me solution of this problems.

I want to understand this decode function which applied in this query

AskTom - Hot Questions - Tue, 07/03/2018 - 00:00
<code> SELECT a.syrmn, a.orgcode, SUBSTR (a.accode, 1, 3) || '0000000' caccode, SUBSTR (a.accode, 1, 6) || '0000' saccode, accode, DECODE (SIGN (SUM (DECODE (a.sntb, 'D', a.samnt, -a.samnt))), 1, SUM (...

converting TIMESTAMP(6) to TIMESTAMP(0)

AskTom - Hot Questions - Wed, 06/20/2018 - 00:00
Currently I have a column with datatype TIMESTAMP(6) but now i have a requirement to change it to TIMESTAMP(0). Because we cannot decrease the precision, ORA-30082: datetime/interval column to be modified must be empty to decrease fractional sec...

How to detect if insert transactions in oracle db are really slow?

AskTom - Hot Questions - Mon, 06/18/2018 - 00:00
At work, I have an Oracle DB (11g) in which I want to detect if there's slow performance while inserting data. Here's the situation: Some production devices send data results from tests to Server A, this server is a important server and it replica...

Get a JSON from a SQL query

AskTom - Hot Questions - Thu, 06/14/2018 - 00:00
Hello! Just a question. Is it possible to write a query that returns a JSON code? If yes, could you give me a brief example? Thanks!