PL/SQL :: Retrieve XML Data In Clob Type?

Dec 5, 2012

I have a table created as below

create table tab123( x clob);

Inserted a row as below

insert into t values ('"<ProcessBatchRequest xmlns:inp1="http://services.abc.com/" ServiceVersionNumber="" xmlns="http://services.abc.com/GlobalBatchServiceV1.0">
<inp1:BatchDetail>
<inp1:ApplicationID>test.123</inp1:ApplicationID>
<inp1:ApplicationBatchID>test.123</inp1:ApplicationBatchID>
<inp1:MessageTimeStamp>2012-11-28T11:05:32.000-05:00</inp1:MessageTimeStamp>

[code]....

Now i want to retrieve the value present under a given xpath.

View 7 Replies


ADVERTISEMENT

SQL & PL/SQL :: How To Retrieve CLOB Data Using DISTINCT Keyword For Other Columns

Aug 2, 2012

I have one query regarding how to retrieve the CLOB data.

The requirement is something that in the select statement there are around 20+ columns which i need to retrieve from around 5 tables after joining.

Since the result set after joining also will get duplicate values i need to use distinct keyword to filter the resultset. But in the 20+ columns there are 2 CLOB data columns which i need to retrieve.

Whenever i use DISTINCT i'm getting ORA-00932: inconsistent datatypes: expected - got CLOB error. I know that DISTINCT keyword cannot be used for CLOB datatypes.

View 15 Replies View Related

How To Convert Long Data Type To CLOB

Nov 15, 2007

i am trying insert data from one DB to other DB table. one field data type is LONG in first DB table, Same field data type in other DB is CLOB.

i used TO_LOB function to convert from LONG to CLOB data type.

My problem is, i used this TO_LOB function, i got illegal operation of LONG Data type.

View 3 Replies View Related

SQL & PL/SQL :: Convert Clob To Varchar Data Type

Aug 16, 2012

I want to convert a clob datatype to varchar data type.I have a clob data type in the below format.

-----------------------------------------------------------------------------------------
<HTML><HEAD><TITLE>Tata Communications Limited</TITLE><BODY leftMargin=20 topMargin=10 rightMargin=20 marginheight=10 marginwidth=10><Table border="0" cellpadding="0" cellspacing="0"
-----------------------------------------------------

I want to insert all the values into varchar datatype.provide the sample code how to convert.

View 1 Replies View Related

SQL & PL/SQL :: Loading XML File Into Clob Data Type

Apr 12, 2012

Iam using Oracle client 11g(32 bit) and Oracle database 11g on Unix server.

I have the created the following procedure to load XML file located in TEST_XML oracle directory( which is mapped to

DB/bulk01/REFLIB/REFDV/LOAD_XML) on the server.

Create or replace procedure TEST_LOAD_XML IS

dest_clob clob;
src_clob BFILE := BFILENAME('TEST_XML', 'arenas.xml');
dst_offset NUMBER := 1;
src_offset NUMBER := 1;
lang_ctx number := DBMS_LOB.DEFAULT_LANG_CTX;
warning NUMBER;

[Code]....

when I execute the above procedure I get ORA-22288 file or LOB operation FILEOPEN failed No such file or directory error.

Looks like it did not find my oracle directory 'TEST_XML'

do I have to do anything like mapping? if so since my database is on unix server how do I map?

View 4 Replies View Related

Replication :: Refresh Fails On MV With CLOB Data Type

May 4, 2011

Some materialized views get status broken on refreshment, but only sometime. When I try to refresh them manually I get following message:

"ORA-01400: cannot insert NULL into...".

But I know for sure that there are no NULL values in the master table, MV and master tables are declared in the same way and all columns in master tables are NOT NULL columns. Another ting is that this error I get only on columns with data type CLOB.

View 1 Replies View Related

XML DB :: How To Retrieve Value Of Enumeration Type

May 21, 2013

I have registered an XSD schema (with gentypes = true) which contains an enumeration type like this:
...
<xsd:simpleType name="OperatoreLogico">
          <xsd:restriction base="xsd:string">
               <xsd:enumeration value="OR"/>
               <xsd:enumeration value="AND"/>
          </xsd:restriction>
     </xsd:simpleType>

[Code]....

was successfully generated the object type:

TYPE "Richiesta_getListaPersoneFisiche"
AS OBJECT ("SYS_XDBPD$" "XDB"."XDB$RAW_LIST_T",
*"operatoreLogico" "XDB"."XDB$ENUM_T"*,
"nome" VARCHAR2(4000 CHAR),
"cognome" VARCHAR2(4000 CHAR),
"codicefiscale" VARCHAR2(4000 CHAR),
"datanascita" DATE) NOT FINAL INSTANTIABLE

Fill correctly the object from an xml valid for the schema using the function "toObject".

I can retrieve the values of all attributes of the object (objectName.attribute), but I do not know how to retrieve the value of the enumeration type (XDB$ENUM_T) "operatoreLogico".

View 8 Replies View Related

Clob Handle In Custom Type In PHP

Apr 17, 2013

I created a custom type what it has a clob member variable:

CREATE TYPE custom_type AS OBJECT(
c_type INTEGER,
c_number NUMBER(38, 8),
c_varchar2 VARCHAR2(4000 CHAR),
c_clob CLOB,
[code]........

The inserting and updating works with constructor: ... custom_type (to_clob('foo')) . But if the data is longest than 4000 characters then the PHP isn't access to it.

So:
The normal case:
$sql = ("INSERT INTO table ( clob_field ) VALUES ( EMPTY_CLOB() ) RETURNING clob_field INTO :clob");
$stid = oci_parse($conn, $sql);
$clobdescr = oci_new_descriptor($conn, OCI_DTYPE_LOB);
oci_bind_by_name($stid, ':clob', $clobdescr, -1, OCI_B_CLOB);
oci_execute($stid);
$clobdescr->save('more than 4000 chars');
...

This case:
I tried:
$sql = ("INSERT INTO table ( ctype ) VALUES ( custom_type(EMPTY_CLOB()) ) RETURNING ctype.c_clob INTO :clob");
$stid = oci_parse($conn, $sql);
$clobdescr = oci_new_descriptor($conn, OCI_DTYPE_LOB);
oci_bind_by_name($stid, ':clob', $clobdescr, -1, OCI_B_CLOB);
oci_execute($stid);
$clobdescr->save('more than 4000 chars');

ORA says: "ORA-00904: CTYPE.C_CLOB: invalid identifier";

How to?Or how to access with any solution?

View 2 Replies View Related

Retrieve Distinct Values From Clob Using Distinct Operator

May 27, 2013

i have a table with a clob column and i have 150 records i want retrieve distinct values from the clob using distinct operator on clob will not work

View 1 Replies View Related

Server Administration :: Functions To Convert The Long Type Field Data To Varchar2 Type

Oct 17, 2011

Is there some functions to convert the long type field data to varchar2 type?

View 2 Replies View Related

PL/SQL :: How To Retrieve The Data In Where Clause 

Dec 28, 2012

SELECT mkct_group_code FROM ID_MKT_CONTTYPE_GROUP_MASTER where mkct_group_code=20'

Note mkct_group_code column is varchar2(10) type.

It has values as
20
10
30
20'
30'

View 3 Replies View Related

Retrieve Data From A Table For Certain IDs

Apr 7, 2013

I am writing a SQL inside an application to retrieve data from a table for certain IDs or for All employees based on the user's input. I create a variable :SELECTION for the where clause. When I run the SQL, I receive the error of missing right parenthesis. There is no error if I hard code the IDs.

If the input is 'All' -> the variable :SELECTION is blank so if the SQL :

select name, address, ID from employee :SELECTION

will be

select name, address, ID from employee

If the input of users ID as '1234','9999' - > the :SELECTION = ' where ID in (:VARIABLEID)'
:VARIABLEID = '1234','9999'

so the SQL:
select name, address, ID from employee :SELECTION

should be

select name, address, ID from employee where ID in ('1234','9999')

However, I got the missing right parenthesis error. I suspect it is something with the single quote, so I tried different ways, but it is still not working.

View 1 Replies View Related

Fast Way To Retrieve All Data Blocks

Apr 19, 2012

I am interested about the fast way to access all data in physical block. what is the quick way to bring data blocks using the rowid, I found this script but soon as I can have faster access:

select * from table_name t
WHERE ROWID between 'AAAUaOAAEAAHkJiAAA' and 'AAAUaOAAEAAHkJiAA8';
where 'AAAUaOAAEAAHkJiAAA' is the last element in the block and 'AAAUaOAAEAAHkJiAA8' is the first one

my question is can retrieve all the data in one block more quick than this query.

View 5 Replies View Related

SQL & PL/SQL :: Retrieve Hierarchical Data From Same Table

Nov 10, 2011

Look into the below table:

TABLE :- EMPLOYEE
________________________
| ID | SUPERVISOR |
|_______________________|
| A101 | B102 |
|________|______________|
| | |
| B102 | C104 |
|________|______________|
| | |
| C104 | D108 |
|________|______________|
| | |
| D108 | E104 |
|________|______________|

Here B102 is supervisor of A101 and C104 is supervisor of B102 and so on. I want to get this data into new table in below format

TABLE :- Hierarchy
________________________________________________________________
| ID |SUPERVISOR_1 |SUPERVISOR_2 |SUPERVISOR_3 |SUPERVISOR_4|
|______________________|_____________|_____________|____________|
| A101 | B102 | C104 | D108 | E104 |
|________|_____________|_____________|_____________|____________|
| | | | | |
| B102 | C104 | D108 | E104 | NULL |
|________|_____________|_____________|_____________|____________|
| | | | | |
| C104 | D108 | E104 | NULL | NULL |
|________|_____________|_____________|_____________|____________|
| | | | | |
| D108 | E104 | NULL | NULL | NULL |
|________|_____________|_____________|_____________|____________|
| | |
| E104 | NULL | NULL NULL NULL
|________|_____________|_____________|_____________|____________|

I want to insert 1st two rows into Hierarchy table, then I would like to update Supervisor_2 to Supervisor_4. Here I don't want to use 'CONNECT BY PRIOR', as it take more time to execute (there are millions of records).SQL code for same.

View 7 Replies View Related

SQL & PL/SQL :: How To Retrieve Data That Does Not Exists In A Table

Dec 13, 2011

I have the following table with the some sample data:

|| Filename || receiving_site || originating_site ||
| fileA | siteA | HQ |
| fileA | siteA | siteA |
| fileB | siteA | HQ |
| fileA | siteB | HQ |
| fileA | siteB | siteB |
| fileB | siteB | HQ |
| fileB | siteB | siteB |

The table works in such way:

1. For each of the Filename, if originating_site is not the same as receiving_site, it means that the file has been sent to receiving_site but has not been acknowledged received yet.

2. For each of the Filename, if originating_site is the same as receiving_site, it means the file has been sent and received by the receiving_site.

My task is to list out all the Filename per receiving_site that has been sent, but not received yet by the receiving_site. For example from the sample data above, I am expecting to see that siteA, fileB has not been received yet.

How can I do that? I had tried MINUS and NOT EXISTS command, but I am just not able to get the result that I want.

View 2 Replies View Related

SQL & PL/SQL :: How To Retrieve 6 Decimal Place Of Data

Oct 14, 2011

IF I have Salary Table,In that Salary Table,How to retrieve 6 decimal place of data .

View 16 Replies View Related

SQL & PL/SQL :: Query To Retrieve The Data Without Iteration?

Dec 27, 2010

I have one table as shown below,

CREATE TABLE MAT
(matrl varchar2(100),
date_man date,
weight number(10)
);

INSERT INTO MAT(Matrl,DATE_MAN,WEIGHT) VALUES ('mat1','12-DEC-10',100);
INSERT INTO MAT(Matrl,DATE_MAN,WEIGHT) VALUES ('mat2','13-DEC-10',200);
INSERT INTO MAT(Matrl,DATE_MAN,WEIGHT) VALUES ('mat3','21-DEC-10',300);
INSERT INTO MAT(Matrl,DATE_MAN,WEIGHT) VALUES ('mat4','26-DEC-10',400);
INSERT INTO MAT(Matrl,DATE_MAN,WEIGHT) VALUES ('mat5','22-DEC-10',500);
INSERT INTO MAT(Matrl,DATE_MAN,WEIGHT) VALUES ('mat6','02-DEC-10',600);
INSERT INTO MAT(Matrl,DATE_MAN,WEIGHT) VALUES ('mat7','23-DEC-10',700);
INSERT INTO MAT(Matrl,DATE_MAN,WEIGHT) VALUES ('mat8','07-DEC-10',800);

The data will look like this .

matrldate_manWeight
mat112-Dec-10100
mat213-Dec-10200
mat321-Dec-10300
mat426-Dec-10400
mat522-Dec-10500
mat602-Dec-10600
mat723-Dec-10700
mat807-Dec-10800

I need to order by this data in terms of date and need to get the data as shown below. Acc_wt is accumulated weight till the material.

Date Weightacc_wt
mat602-Dec-106000
mat807-Dec-10800600
mat112-Dec-101001400
mat213-Dec-102001500
mat321-Dec-103001700
mat522-Dec-105002000
mat723-Dec-107002500
mat426-Dec-104003200

Can we make use of oracle lag and lead functions here?Or some other methods?

View 6 Replies View Related

SQL & PL/SQL :: Retrieve Data From Blob Column?

Sep 30, 2011

example for retrieve data from blob column using pl sql procedure in oracle?

View 2 Replies View Related

SQL & PL/SQL :: Retrieve Subset Of Data From Table

Jan 20, 2012

How to retrieve first hundred records from a table ?

FYI
---

The table size is 5 GB
The table count is 127922653
Table has 14 columns

Table is partitioned as well.

The table has 10 partitions.

View 17 Replies View Related

Forms :: Using LOV On Some Field To Retrieve Data

Jun 8, 2011

I am using LOV on some field to retrieve data, but sometimes it does not retrieve anything cause of unavailability of date its fine but i want to put N/A in that field when such condition is occurring .

View 2 Replies View Related

Get Data From CLOB

Sep 28, 2011

I'm writing a PHP page to display some data from an Oracle database. Unfortunately, I can't copy the code because it's proprietary. One of the columns in the db is of type CLOB. I'm having trouble getting the data from the CLOB column.

The way the code is now, is there is a query string read into a variable, and the query string variable is read into a function that then retrieves the data from the db. Once the result set is returned, it is parsed to get data from all of the columns. The issue is that I've never worked with CLOB data before, so I'm having some difficulty extracting the data for that column. I know I can use the DBMS_LOB.READ function, but I'm not sure how to apply it in this case. The following is a generic form of the query string I'm using with b.clob_col being the column I'm having issues with.

$queryString = <<<EOD
SELECT a.col1,
a.col2,
a.col3,
b.col4,
b.col5,
b.clob_col,
from table1 b
inner join b.col4
on blah1
inner join a.col2
on blah2
where blah
and blah
EOD;

View 1 Replies View Related

SQL & PL/SQL :: Retrieve Data By Checking Any Part Of The String?

Jul 8, 2012

I have a table

select * from testing
Quote:
ID NAME REDATA
-------------------- -------------------- --------------------
1 ABC,DEF,GHI,LKJ 000001
2 MNC,GHI,CTF 000002

2 rows selected

select * from testing where name like ('GHI,TCF');

now my output should be as above because GHI is common in both the names.if any of the where condition string matches the Name field then I need that record to be retrieved.

View 9 Replies View Related

Forms :: How To Retrieve Only That Data Which Is Based On Given Condition

Jun 22, 2011

,i have a table called travel detail from which i have retrieved few rows based on 1 condition by using LOV and on next few rows modification is allowed. The rows are getting modified but it is also allowing me to enter in next blank row and insert any data in that row.how can i retrieve only that data which is based on the given condition. Further blank rows should not b displayed.

View 2 Replies View Related

SQL & PL/SQL :: Retrieve Data With Multiple Select Statements

Jun 3, 2012

I'm trying to retrieve data with multiple select statements. The query works fine for 1 account (segment6) but fails for more than account. Below is the query.

select PERIOD_NAME "Month/Year",segment1 "Company" ,Segment6 "GL Account", currency_code "Currency",Mmt "Movement",
BEGIN_BALANCE+PERIOD_DR-PERIOD_CR "Balance At Date"
FROM
(select gb.period_name "PERIOD_NAME",decode (gcc.segment1, '20', 'Internode', '10', 'Agile') SEGMENT1,
gcc.segment6 "SEGMENT6", gb.currency_code "CURRENCY_CODE", gb.begin_balance_dr "BBDR", gb.begin_balance_cr "BBCR",

[code].....

View 3 Replies View Related

Forms :: Fetching Data - Retrieve Username

Sep 7, 2010

I have a detailed block with a user ID column. The user name is not available in the block. Therefore, I have created a non-database column to retrieve the user name into it.

Here is the code I've used.

PROCEDURE get_details IS

iLoop number := 1;

CURSOR c is

SELECT FULL_NAME
FROM GRP_EMPLOYEE
WHERE EMPLOYEE_NUMBER = :USER_ID;

[Code]...

However, it retrieves the first record only.

The results are displayed like this.

Loop: Result:

1 Full_Name
2 Empty
3 Empty
4 Empty

View 2 Replies View Related

PL/SQL :: Retrieve Data By Using Both Group By And Order By Clauses?

Nov 16, 2012

I have a table name as angdata77 having attributes like asigno..i want to retrieve data from angdata77 by using both group by & order by clauses.. for total count..am using the query as

select asigno,count(*) from angdata77 group by asigno order by asigno;

Is there any other query for retrieving the data from angdata77

View 5 Replies View Related

Table Locking When Many Users Retrieve Data

Sep 2, 2009

I have a "select ... into" in my PL/SQL and it doesn't retreive any data(I suppose just certain columns because if it doesn't retreive a row then the PL/SQL should throw an error) when there are many users accessing this table. It shouldn't be some table locking right? Because if it is, it should wait until the table is available then it will retreive data. Currently it just proceeds with the PL/SQL and selecting nothing in that query. what details should I look at to trace the cause of this problem.

View 4 Replies View Related

Security :: How To Retrieve Unmatched Data From A Column

May 30, 2013

i have a column that contains 1 to 100 values but it has some missed data such as it does not has 50,45,34,23 etc..

so how could i find the missed data alone in a single query..

View 4 Replies View Related

How To Connect To Oracle To Retrieve Data Using SQL Language

Jan 9, 2012

how to connect to Oracle to retrieve data using SQL language. I've started with a new company which is pretty much a sink or swim type of environment meaning you're an idiot if you don't figure it out on your own. I was told that we use Toad for Oracle 10g. I was given a server name; location and an .ora file named tnsnames that was given to me but I have no clue what to do with. I've come from companies where this was already setup. You just go into access to retrieve the data.

II have totally hit a brick wall with all the other roadblocks I encounter and all researched out. Where I can get step by step instructions on how to connect to start sql in Toad/Oracle?

View 5 Replies View Related

PL/SQL :: How To Retrieve Data Delete From Main Table

Nov 10, 2012

I am using oracle 11g database.

unforunatly i delete the data from main table. and i operated alter stmt.

now how do i retrieve the data..??

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved