I want to replace below multiple call to procedure with a Single query. Currently this proc is getting called multiple times from application.
FUNCTION f_get_shows_info(i_booking_wk_id IN NUMBER, i_screen_id IN NUMBER) RETURN VARCHAR2 IS v_act_shows booking_wk_screen.act_shows%TYPE; v_expected_shows booking_wk_screen.expected_shows%TYPE; v_return VARCHAR2(50); BEGIN SELECT NVL(act_shows, 1), NVL(expected_shows, 1) INTO v_act_shows, v_expected_shows FROM booking_wk_screen WHERE booking_wk_id = i_booking_wk_id [code]...
Is there anyway through which we can achieve this in Oracle 10g.
CREATE TABLE T1 ( id NUMBER, START_date DATE, end_date DATE, end_date1 DATE, end_date2 DATE, end_date3 DATE, LEVEL1 number ) /
[Code]...
I have data in the first table as mentioned above I need to insert multiple rows into the second table for the same ID depends on the level, If it is level 1 then two rows for same ID first reocrd start_date as the start_date and end_date as end_date from the table t1 for second record start_date is end_date in t1 and end_date for this record is end_date1 column in table t1.
If the level is 3 then the table t2 should have four records for one id and the phase is the value for each record for one ID for example in level 3 we have 4 records for one id and phase should be 1,2,3,4.
I have a single node Oracle E-Biz 12.1.3 Installation.We plan to convert this to a dual node RAC install and I wanted to run by the steps to perform this AND clone over the current production system to the new RAC system (note this will not be using ASM - but will be based on NetApp NFS)
1. Install GRID 11.2.0.3 - installed acorss two nodes, Binaries can be shared - voting disks / cluster rigistry MUST be shared
2. Install Database Software for RAC - Binaries cannot be shared and must be installed on each node independently
3. Configure the GRID for database (database / listeners)
4. Clone over the stand alone system (clone database as RAC)
I will be using SCAN - and therefore would expect all the web services / concurrent manager nodes to point to the SCAN hostname as opposed to individual host names.
I have 11gR2 GI installed on two nodes. I am trying to convert a 10g single instance (uses ASM) database to RAC and getting this error. I am trying using 12c as well as manually by using rconfig.
[main] [21:19:15:145] [ASMInstance.initialize:135] First record =[Ljava.lang.String;@958bb8 java.lang.NullPointerException at oracle.sysman.assistants.rconfig.engine.ASMInstance.initialize(ASMInstance.java:153) at oracle.sysman.assistants.rconfig.engine.Step.execute(Step.java:283)
Here columns should be created based purchase dates dynamically with respect to quantity. Query out put will be like matrix format. So i feel that PIVOT & SYS_CONNECT_BY_PATH will not serve my requirement.
I have a table where user can store images in clob format.Need to convert the same image to blob and store in a dummy table.
I tried using this --function creation CREATE OR REPLACE FUNCTION FN_CLOB_TO_BLOB(CLOB_IN IN CLOB) RETURN BLOB IS POS PLS_INTEGER := 1; BUFFER RAW(32767);
Though the count in the Table after load is the same as the input file, they are all NULL.
I tried adding FIELDS TERMINATED BY X'A' for new line and also FIELDS TERMINATED BY X'D' for carriage return. Both times bad file was created and the records that were loaded were again NULL.
The input file has a list of emails: iatraveler2008@aol.com iaz65@aol.com 2blue2brown@comcast.net 2c3mwilson@embarqmail.com abigailolschan@comcast.net imisskoco@aol.com
I tried FIELDS TERMINATED BY X'10' and FIELDS TERMINATED BY X'13' too for new line and carriage return respectively. This time there were no bad file created, but the Table has Null values.
Log File contents:
Number to load: ALL Number to skip: 0 Errors allowed: 10000 Bind array: 64 rows, maximum of 256000 bytes Continuation: none specified Path used: Conventional Silent options: FEEDBACK, ERRORS and DISCARDS
I have one table called posh, which has about 50,000 ids (millions of rows) so far. It is currently at about 50 gb. So each series of rows for a particular id is about 1 mb.
CREATE CLUSTER posh_cluster (id int) SIZE 2M STORAGE (initial 2000K next 2000K) PARALLEL 4; CREATE INDEX posh_cluster_index ON CLUSTER posh_cluster;
[code].......
According to the Oracle documentation size is "the average cluster key size", I am not really sure what that means. Is this the 1mb in posh table space I am using for each series of rows for an id, or the space used for the index? Secondly, the storage parameter for 'CREATE CLUSTER' should be what?
How can i copy a single column from one table to another. Table 1 has a column with data in it, table 2 has the column but is empty, i want to copy data for a single column from table1 to table 2. By the way these table have multiple columns.
I am running 3 for loops in continuation. These loops retrieve me 63 values. I need to insert 1 single row in a table and then exit from the same. Moreover when i run the same loop again I need to insert 2nd value fo the second row in the table. The table is having a unique key which does not allow me to load redundant data.
i have to update a single column(x.c) in x table.here the condition is x.a is not null and x.b is not null x.d is null then update x.c=x.b for each row.
CREATE TABLE TEST11(TNO NUMBER(5), TVAL VARCHAR2(100), TID VARCHAR2(10)); INSERT INTO TEST11 VALUES(1,'VIJAYA','TEST'); INSERT INTO TEST11 VALUES(2,'VIJAYA','TEST'); INSERT INTO TEST11 VALUES(3,'VIJAYA','TEST'); INSERT INTO TEST11 VALUES(4,'VIJAYA',''); INSERT INTO TEST11 VALUES(5,'VIJAYA','');
[Code]....
My requiremen is if record is exists then i wan to update some value, if record not existes the i wan to insert new record
create tablespace mssm datafile 'c:appmssm01.dbf' size 100m segment space management manual;
create cluster hash_cluster_4k ( id number(2) ) size 8192 single table hash is id hashkeys 4 tablespace mssm;
-- Created a table in cluster with row size such that only one record fits one block and inserted 5 records each with a distinct key value
CREATE TABLE hash_cluster_tab_8k ( id number(2) , txt1 char(2000), txt2 char(2000), txt3 char(2000) ) CLUSTER hash_cluster_8k( id ); [code]....
If I issue the same query after creating unique index on hash_cluster_tab(id), the execution plan shows hash access and single I/O (cr = 1).Does it mean that to have single I/o in a single table hash cluster, we have to create unique index? Won't it create additional overhead of maintaining an index?
What is the second I/O needed for in case unique index is absent?
i WANTED TO SIMPLIFY THIS CODE SO THAT I NEED NOT DO ALL THESE manipulations but still get the result of UNI_CUG_SITE,
Create Table CUG_SITE compress nologging As Select C_Key, S_Key From A group by C_Key, S_Key / commit / --Creating a table for all Single Sited Customer --- [code]........