JDeveloper, Java & XML :: How To Use Sql To Bypass Xml Special Character

Jun 20, 2012

"SELECT xmltype(RCATT).extract('/JASON/RCA/SUB_PROBLEM_TYPE').getStringVal() as SPT,
xmltype(RCATT).extract('/JASON/RCA/SUB_ROOT_CAUSE').getStringVal() as SRC,
xmltype(RCATTT).extract('/JASON/RCA/ELABORATION').getStringVal() as ELA,
xmltype(RCATT).extract('/JASON/RCA/PREVENTION').getStringVal() as PRE
FROM table"

Above is my select statement

some explanation: the above select statement is to select the child node inside the xml content. But the child note contains some special character "<>" that illegally in xml.

Below is my xml content for the node of sub_problem_type

<JASON>
<RCA>
<SUB_PROBLEM_TYPE>
For <FS_PLS_WAIT>, it is appeared in both valid and invalid password entered case but in requirement, only valid case has stated the display of <FS_PLS_WAIT>. This is the legacy radio behavior.
</SUB_PROBLEM_TYPE>
</RCA>
</JASOn>

The result will generate the following issue.

ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing LPX-00225: end-element tag "ELABORATION" does not match start-element tag "FS_PLS_WAIT" Error at line 10 ORA-06512: at "SYS.XMLTYPE", line 301 ORA-06512: at line 1

I wish to know where can i by pass the checking for special character.

View 1 Replies


ADVERTISEMENT

JDeveloper, Java & XML :: Parsing With Special Character As Part Of Data

Sep 10, 2013

I'm using following select to parse XML as table ( Oracle 11.2.0.3.0 EE Linux and Windows)

SELECT a.id, a.name, a.description
FROM ( XMLTABLE('//ROW'
PASSING (SELECT xmltype('<ROWSET>
<ROW><ID>1111</ID><Name>Name1</Name><DESCRIPTION>AAA</DESCRIPTION></ROW>
[code]........

However, when DESCRIPTION contains "<" as part of it - I'm receiving an error:

SELECT a.id, a.name, a.description
FROM ( XMLTABLE('//ROW'
PASSING (SELECT xmltype('<ROWSET>
<ROW><ID>1111</ID><Name>Name1</Name><DESCRIPTION>AAA</DESCRIPTION></ROW>
[code]........

Quote:ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00231: Invalid character 61 ("=") found in Name or Nmtoken

I'm receiving a XML from some external source and can not change it.

View 8 Replies View Related

SQL & PL/SQL :: How To Insert Special Character / ORA-00911 / Invalid Character

May 25, 2010

We have Oracle 10g and user trying to Insert following in one of our table field and getting error:

'REVOLUCIÃ"N Historical Corruptions Agenda'

Getting follwoing error:

ORA-00911: invalid character
create table Employee
(Emp_ID Varchar2 (10),
Company_Name Varchar2 (40)
)
Insert into Employee
values ('Emp1', 'REVOLUCIÃ"N Historical Corruptions Agenda');

View 5 Replies View Related

JDeveloper, Java & XML :: Using Java.lang.Math In Oracle / ORA-31011 / Parsing Failed

Apr 26, 2013

I am trying to execute an xslt (for XML transformation) using xmltype.transform function.

I can't paste XSLT code here, but below is similar what I am doing.

[URL]

I have used a reference of random() method of java.lang.Math in xslt file, and it's giving me below error.

ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00607: Invalid reference: 'random'.

I doubt, it's because of "Math" class, which is not present in Oracle, how to load standard java classes.

View 1 Replies View Related

JDeveloper, Java & XML :: Java Stored Procedure Invoking Windows Run Time Process

May 22, 2012

I am trying to invoke program from my local Windows machine (exactly java executor, which is in my environment on c:javajdkinjava) using database package with Java stored procedure.

Everything is fired by SQLPLUS script, this script invokes package with Java stored procedure (jar loaded into Oracle) and that procedure is trying to invoke runtime process (syntax:

c:javajdkinjava -cp

and here ara my classes and main jar) using my local java executor. I added all permissions using dbms_java.grant_permisions (execution forced me to give permissions java.io.FilePermission to <<ALL_FILES>> for execute), moreover I added to my database user JAVASYSPRIV and JAVAUSERPRIV role. Unfortunately, beside this I am still getting error:

C:javajdkinjava not found (Note that lookup with PATH isn't done due to the oracle executable being setuid.)

View 8 Replies View Related

JDeveloper, Java & XML :: Java.sql.SQLException - Execute Batch - Exception Equal To 1?

Jul 14, 2011

I was getting java.sql.SQLException: executeBatch, Exception = 1when i tried to use executeBatch().could not understand why i am getting it.

View 1 Replies View Related

JDeveloper, Java & XML :: Calling Java Stored Procedure From Oracle

Jun 20, 2011

I am writing a java stored procedure in my package. In the java procedure I want to issue a query to be fired on the user table from which I am calling the java procedure.

Some thing like following:

I am logged in to USER1 and my package is inside USER1. From this package I am calling the Java Stored Procedure. In java procedure I want to make a jdbc connection to USER2. The details of USER2(password, hostname,portno) are stored in a table called 'connection_details' and this table is in the USER1.

My problem is how can I issue the

SELECT details FROM CONNECTION_DETAILS for USER2

so that i can get the details..?

Do i need to first make jdbc connection to USER1 and then execute the above query for which i need similar details of USER1. How can i obtain the details of USER1 here.

I am thinking if I am already in USER1 then do I need to make the jdbc connection to USER1 and then execute the query?

View 1 Replies View Related

JDeveloper, Java & XML :: Create Or Replace And Compile Java - Getting Ora 29531?

Dec 21, 2011

I've this java source create or replace and compile java source named "Decodificador" as
public class Decodificador {
public static String decodifica(String codigo)
return codigo;

and this function

create or replace function F_Decodificador(codigo varchar2) RETURN VARCHAR2 IS
LANGUAGE java NAME 'Decodificador.decodifica(String) return String';

when I execute the function the result is:

ORA-29531: no method decodifica in class Decodificador

View 8 Replies View Related

JDeveloper, Java & XML :: Best Driver For Java To Oracle Database Connection

Jul 30, 2012

Which is the best driver for java to Oracle database connection ?

View 1 Replies View Related

JDeveloper, Java & XML :: Call DB Function From Java Hibernate

Feb 10, 2011

I need to call DB function through Java Hibernate.

My Sample XML File looks like.
---------------------------------------------------------------
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<sql-query name="getchequeno" callable="true">
?:=call cz_nab_mw_fn_gen_ol_chq_no()
</sql-query>
</hibernate-mapping>
---------------------------------------------------------------
I am getting below error while reading the file

"java.lang.RuntimeException: org.hibernate.HibernateException: Errors in named queries: getchequeno"

View 1 Replies View Related

JDeveloper, Java & XML :: How To Pass Any Array From Java To Oracle

Feb 4, 2005

Here is a problem. I have to pass an array e.g ('Account','Marketing',Computer' ) from java to Oracle 9i.

Would I be able to do in Oracle, if yes then how ?

View 11 Replies View Related

JDeveloper, Java & XML :: Native Java In Oracle Versus PL/SQL?

Aug 26, 2011

we can you java code natively with Oracle. But I didn't get how to decide when to use native java in oracle and when to use pl/sql.

View 5 Replies View Related

JDeveloper, Java & XML :: Using PL/SQL Function To Execute Java Class?

May 20, 2013

i`m trying to use pl/sql function to execute java class. I created 2 tables with around 100 values and java class with simple functionality. I need to create function to loop through my table1 and get with each iteration one value from table and pass that value as parameter to java class.

table1 is something like this:

ID NAME
1 name1
2 name2
3 name3
. .
. .
100 name100

table2 is empty with same columns as table1 ( table2 is for data obtained from java returns ) I created in sql+ java class.

CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "myClass" AS
import java.io.*;
import java.util.*
public class myClass {
public static String fun(String strName)

[code]....

Then i wanna make a pl/sql function for:

1)For i = 1 Obtain first value from table1 (column name) and pass it throught java class then return value and save it in table2 with the same id as id from table1

2) change i=1 to i=2 and do that same

3) end if i=101

View 1 Replies View Related

JDeveloper, Java & XML :: Connection Between Java And Oracle

Nov 26, 2012

I Program with Java . when we connect oracle by program ,

Get the following error :

'No suitable driver found for jdbc:orcl:thin:@localhost:1521 '

View 3 Replies View Related

SQL & PL/SQL :: Special Character In String

Feb 23, 2011

My requiremnt is that a field must contain on Alpha number value, no specail character allowed, how can we sure by query that string which is going to commit is alphanumeric.

View 2 Replies View Related

How To See The Exact Special Character

Mar 18, 2013

I am using Release 10.2.0.1.0 version of oracle. I am getting a special character, but i suspect it as any other language character.

Its appearing in my 'TOAD editor/Sql prompt editor' as 'A?'. but when i am selecting it from the table using below query, its giving 'No rows Returned'.

select id from tab1 where id like 'A%';

How can i be able to see the exact character or which editor will enable me to see the character?

I think sql developer GUI might be able to show the same but i dont have sql developer with me.

View 1 Replies View Related

Insert Special Character In Database?

May 5, 2008

I am trying to insert data into table through SQL.

However my table has a column by name "User Name". Now I have a user name " x,yz" (see there is comma b/w x and y).

how do I escape and insert this data(x,yz) into the table.I need data as it is in DB for my application.

View 1 Replies View Related

PL/SQL - Generate Update DML With Special Character?

Dec 1, 2010

I have a pl/sql question about interpreting special characters in pl/sql. I am generating an update statement and get an invalid character when the customer name has an ampersand in it (&). I�m now generating the update statement to include the customer name cut up with concatenation characters surrounding the ampersand, for example �CSCP-C�||�&�||�E�. However, pl/sql is still not executing the update.

Here is the code.

SET PAGES 2000;
SET LINES 200;
SET SERVEROUTPUT ON;
SET VERIFY OFF;
spool update_table.log ;

[code]....

The RESULTS follow. Of course, I can copy this statement and execute in sqlplus without a problem.

---------------------------------------------
- UNKNOWN ERROR CONDITION
SQL = UPDATE mytable SET CUSTOMER_CORE = ('DSCP-C' || '&' || 'E') WHERE REC_ID = 170795889
;
---------------------------------------------
PL/SQL procedure successfully completed.
SQL>

View 1 Replies View Related

SQL & PL/SQL :: Drop Table With Special Character?

Jul 15, 2011

I have created a table with space by mistake.how to drop that..?

QL> select * from cat where table_name like 'OM_DW_RTNORD%';

TABLE_NAME TABLE_TYPE
------------------------------ -----------
OM_DW_RTNORD? TABLE
OM_DW_RTNORD TABLE

[code]....

no rows selected

SQL> drop table OM_DW_RTNORD? purge;
drop table OM_DW_RTNORD? purge
*
ERROR at line 1:ORA-00911: invalid character

View 3 Replies View Related

SQL & PL/SQL :: Special Character Not Allowed In Column Value?

Aug 8, 2012

I have a table stud_mst In which i have following columns STUD_NAME , ROLL_NO , COURSE

Table values are for e.g

STUD_NAME , ROLL_NO , COURSE
Harshita 1323 BSC
Atul 1734 BCOM
L'Pradhan 3739 BA

Still today user can enter any special character value in stud_name like L'Pradhan . I want to put a restriction on stud_name so that user can enter only alphabetical value into stud_name column.

View 6 Replies View Related

SQL & PL/SQL :: Cursor Not Fetching Special Character

Feb 5, 2013

This is the cursor which fetches from View uk_case_recommends_vw and this view calls the table ukcc_case_casenames below is the query

cursor cur_case_name_search is
select a.*,DENSE_RANK() OVER (ORDER BY sc desc) rank
from uk_case_recommends_vw a
where rownum < 2 + 3;
SELECT
/*+first_rows(4) index(u ukcc_case_casename_idx)*/
persistentid,
casename,
FROM ukcc_case_casenames

Here in this table my case name may be with special character or normal .

For Ex ('R V Wilson') - With Special character
('R V Wilson') - Without Special character

Actually my cursor is not fetching with special character ..neither it is not mentioning as no data found. Find the piece of code below.. I am not getting values after opening the cursor.

open cur_case_name_search;
loop
fetch cur_case_name_search into v_case_name_row;
exit when cur_case_name_search%notfound or
v_case_name_row.rank > v_matchingvalue or
[code]......

View 10 Replies View Related

SQL & PL/SQL :: How To Store Special Character In Database

Aug 19, 2010

i want to store special characters in database. i have tried following but not succeed. how to store and retrieve it. Herewith i'm posting my try.I want to store and retrieve following character.

SQL> select nchr(181) from dual;

N
-
µ

SQL> create table temp (uom varchar2(10));

Table created.

SQL> insert into temp values(nchr(181));

1 row created.

SQL> commit;

Commit complete.

SQL> select * from temp;

UOM
----------
?

here i'm getting the '?' but i want 'µ'.

View 2 Replies View Related

SQL & PL/SQL :: Special Character Interpreted Differently?

Feb 21, 2011

I have to update 'SAINT BARTHÉLEMY' in the database . when I update the same from sql prompt Its getting updated correctly .

But when we want to see the same from Toad/Sql developer its interpreting this character in different way .

I tried e.g.

select dump( 'SAINT BARTHÉLEMY') from dual;
select dump( 'É') from dual;
Returns me
DUMP('SAINTBARTHÉLEMY')
---------------------------------------------------------------
Typ=96 Len=16: 83,65,73,78,84,32,66,65,82,84,72,144,76,69,77,89
DUMP('É')

[code]....

Where I should fix to bring both in sync.

View 2 Replies View Related

SQL & PL/SQL :: Escape Special Character Word

Jan 7, 2011

E1 Table Data

Job_id
Sa_Clerk
Sa_Manager
Sahil

select job_id from E1 where instr(job_id,'_')>0;

returns output

Sa_Clerk
Sa_Manager

same as

select job_id from E1 where job_id like 'Sa_\%' escape '';

resturns

Sa_Clerk
Sa_Manager

Same Result , Then What is exact need of Escape

View 4 Replies View Related

SQL & PL/SQL :: Maintain Day 0 Value Of Special Character ÿÿ For Application

Aug 29, 2012

We need to maintain the day 0 value of special character "ÿÿ" for application. If i use the special character directly in sql file , it is getting inserted as junk character "?"

If i use workaround by using chr(255) function i am getting below behavior.

select chr(255) from dual
---------------------------
ÿ

However below query gives null value.

select chr(255)||chr(255) from dual

View 5 Replies View Related

SQL & PL/SQL :: Different Special Character Display Oracle 10 Versus 11g?

Sep 17, 2012

A database containing inventory data has been migrated from Oracle 10g to Oracle 11g. I have access to both the Oracle 10g and Oracle 11g database on different client computers. Both databases use the same character set, WE9MSWIN1252 (query shown below). However the results from the sql SELECT show incorrectly displayed characters. I would like the "1/2" character and degree character to show in the text. The ASCIISTR function shows that the underlying ascii is the same in the two copies of the databases.

Is there a setting that needs to be changed in Oracle 11g so that the saved special characters in the database show correctly (as in Oracle 10).

Query of database character set

SQL> Select value from SYS.NLS_DATABASE_PARAMETERS where PARAMETER = 'NLS_CHARACTERSET'
WE8MSWIN1252

Under Oracle 11g, this is a query on DSI using SQLPLUS 11.2.0.1.0.

SQL> select description from part where id = '57234';

DESCRIPTION
----------------------------------------
KL BRKT PLN 22╜░ ANGLE (AMER BOT RAIL)
SQL> select asciistr(description) from part where id='57234';
ASCIISTR(DESCRIPTION)
--------------------------------------------------------------------------------

[code].....

View 6 Replies View Related

Server Utilities :: Getting Special Character While Loading?

Sep 19, 2013

I have a file which i am loading , the last column is being loaded with special character which looks like sqare shape character for all the rows.How can i prevent it to load as it is not present in the file

data in file

Department|2|Tranport for London|Rail & Underground|ER|ER|ER|ER|ER|ER|555555555|Owner 8|8

the data once loaded for the last column on which is for above example last column value 8 will be loaded with 8 and square share character.

View 5 Replies View Related

SQL & PL/SQL :: Special Character Conversion / Translate / Replace

Nov 3, 2010

I have requirement to cleanup special character of field. The data which is retrieved from the field and written to text file.

So Here

Ã- should be replaced by i
HÃ-­re - I need value Hire(actual value) from the filed.
í- this has written into file instead of i

In database i have the following

NLS_NCHAR_CHARACTERSET - AL16UTF16
NLS_CHARACTERSET - UTF8

I tried this

select convert('HÃ-re','UTF8') from dual
------------------------
Output: H??re

View 6 Replies View Related

PL/SQL :: LENGTH (String) Ignores Special Character %?

Oct 10, 2012

why the below is not the same?

select * from textsearch where
LENGTH(TRIM(BOTH ' ' FROM Text)) < 1
--0 Rows

select * from textsearch where Text='%';
--12 Rows

View 1 Replies View Related

SQL & PL/SQL :: Handling Special Character (&) In Oracle Stored Procedure?

Apr 23, 2013

How to handle special charater '&' in stored procedure.

Following is a test code I want to Implement

CREATE OR REPLACE PROCEDURE SP_Test(QueryID NUMBER,DateFirst DATE,DateLast DATE) IS
BEGIN
INSERT
INTO TempTable(QueryID,LineID,data,Datetime)
SELECT
1,6,Emp,startdate FROM salary

[code]....

The code above resuts into INVALID state of stored procedure and cannot be executed.

View 8 Replies View Related







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