oracle10g

How Oracle 10g evaluates NULL in boolean expressions

你。 提交于 2019-12-12 09:48:20
问题 if not (i_ReLaunch = 1 and (dt_enddate is not null)) How this epression will be evaluated in Oracle 10g when the input value of the i_ReLaunch = null and the value of the dt_enddate is not null it is entering the loop. According to the rules in normal c# and all it should not enter the loop as it will be as follows with the values. If( not(false and (true)) = if not( false) =if( true) which implies it should enters the loop But it is not happening Can someone let me know if i am wrong at any

Find Users who worked for 5 consecutive days with date-range in output

老子叫甜甜 提交于 2019-12-12 09:17:46
问题 I have a table has data similar to below Emp Date Code --- -------- ---- E1 11/1/2012 W E1 11/1/2012 V E2 11/1/2012 W E1 11/2/2012 W E1 11/3/2012 W E1 11/4/2012 W E1 11/5/2012 W I want to get list of employees between a date range(say for the last 3 months) who worked for code W conescutively for 5 days with the date range in the output. Each employee can have multiple records for a single day with different codes. Expected Output is Emp Date-Range --- ---------- E1 11/1 -11/5 Below is what I

Oracle 10g Connect By Prior - Performance Issues

杀马特。学长 韩版系。学妹 提交于 2019-12-12 08:57:40
问题 I have the following SQL statement: SELECT CONNECT_BY_ROOT ANIMAL_ID "ORIGINAL_ANIMAL" , ANIMAL_ID, LINE_ID, SIRE_ANIMAL_ID, DAM_ANIMAL_ID, LEVEL -1 "LEVEL" FROM ANIMALS START WITH ANIMAL_ID IN( '2360000002558' ) CONNECT BY ((PRIOR SIRE_ANIMAL_ID = ANIMAL_ID and LEVEL < 5) OR (PRIOR DAM_ANIMAL_ID = ANIMAL_ID AND LEVEL < 5)) This in in a table with about 1.6 Million animals. Each record has Animal_Id, Sire_Animal_Id, and Dam_Animal_Id (Sire = Father, Dam = Mother). I use this sql to display

Sorting records from Oracle with multiple decimal points (.)

故事扮演 提交于 2019-12-12 08:36:00
问题 UPDATE: ORACLE VERSION 10G I have a list of records in Oracle as follows, these are actually sections of various books The records are generated in the below format [main topic].[sub topic].[first level section] ..... .[last level section] Sections -------- 1 7.1 6.2 7.1 7.4 6.8.3 6.8.2 10 1.1 7.6 6.1 11 8.3 8.5 1.1.2 6.4 6.6 8.4 1.1.6 6.8.1 7.7.1 7.5 7.3 I want to order this like as follows 1 1.1 1.1.2 1.1.6 6.2 6.4 6.5 6.6 6.7 6.8.1 6.8.2 6.8.3 7.2 7.3 7.4 7.5 7.6 7.7.1 7.7.2 8.3 8.4 8.5 10

What are the ways to insert & retrieve BLOB data from Oracle database using SQL?

空扰寡人 提交于 2019-12-12 08:05:10
问题 I've tried to insert BLOB data with SQL developer. But I can't find the insert statements which are actually used to insert BLOB data. Apart from that, the database speed is really slow. For small files, it executes fine. But when I tried to import 50 mb avi file into BLOB, it took 3-4 minutes & still it was not completed. When I tried to export the BLOB data to a file, exporting process was also slow. I was using Oracle 10g Express Edition. If the database speed is slower than even file

Joining data from 5 tables without duplicate values and getting result with custom status in Oracle 10g

China☆狼群 提交于 2019-12-12 06:46:30
问题 I have 5 tables which I have to use to get the set of pending documents for a theft claim. I am using Oracle 10g. The table structures are given below. 1. mo_documents_master -- master table for all document types CREATE TABLE "MO_DOCUMENT_MASTER" ( "DOC_ID" NUMBER NOT NULL ENABLE, "DOC_TYPE_NAME" VARCHAR2(100 BYTE), "STATUS" VARCHAR2(50 BYTE), CONSTRAINT "MO_DOCUMENT_MASTER_PK" PRIMARY KEY ("DOC_ID") ) 2. mo_theft_pvt_documents -- Contains list of documents applicable for a theft claim; they

Delete query is not working form java application

对着背影说爱祢 提交于 2019-12-12 06:38:37
问题 I have a table with 4 columns c1, c2, c3, c4 . c1 and c2 form the primary key of the table. When I run the following in Java then it hangs in my application. DELETE from mytable where c1 = 'val' and c2 = 'val2' However, the same query runs in the Oracle DB console perfectly fine. When I run DELETE from mytable where c3 = 'val' it works perfectly fine from my application. What could be the reason? 回答1: Maybe just one Oracle session blocks another. In this case "console" session block Java app

Filling Datagrid And Sql Query

北战南征 提交于 2019-12-12 05:39:48
问题 I have 3 tables in database shown below. And I want to make a report just like shown link below. How can I do it with datagrid or datalist? Which one is the best chois? I have tried to do it for a week. COMPANY : ID_COMPANY, COMPANY_NAME PRODUCT : ID_PRODUCT, PRODUCT_NAME PRODUCT_SALE : ID_COMPANY, ID_PRODUCT, SALE_COUNT Updated : I could do it, with your helps. However Now I have a small problem too. When I write query with pivot, products' name become column header. if a product name's

org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations)

我是研究僧i 提交于 2019-12-12 05:39:36
问题 I have 3 tables in Oracle (10g). Zone Weight ZoneCharge Where ZoneCharge has a composite primary key(zoneId, weightId) which references to primary keys of the Zone and the Weight tables. I need to delete all the rows from the ZoneCharge table based on the zoneId supplied (the weightIds are unknown in this case). The native Oracle SQL to achieve this would be as simple as follows. DELETE FROM zone_charge WHERE zone_id=22; I have tried the following way (in DAO). @Override @SuppressWarnings(

Postgresql and Oracle: update multiple tables from common subquery

左心房为你撑大大i 提交于 2019-12-12 05:26:09
问题 Hello i have got 4 tables first table is menu have got column: Id number PK parent_id number FK to menu.Id title character varying(250) softdel boolean default false second table is page : id as PK menu_id as FK to menu.id page_id as FK to page.id softdel boolean default false third table is article : id as PK and FK to page.id softdel boolean default set to false and fourth table article_lang : partial_id as PK id as FK to article.id language character softdel boolean default set to false