SQL & PL/SQL :: Extracting Data From Web Service Response

Mar 26, 2013

I need to extract tag values from REST web service response.

Webservice response

Quote:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <LicenseDetailsRes xmlns="com:*******services:LicenseDetailsRes">
<ResponseCode>LD001 - SUCCESS</ResponseCode>
<OrderNumber>51663852</OrderNumber>
<LineNumber>8</LineNumber>
<quantity>0</quantity>
</LicenseDetailsRes>

I am storing above response in a table column 'output_xm' of xmltype datatype.

My requirement is to extract 'ResponseCode' & 'quantity' values from above response. For which I am using below query but it's not working.

SELECT x.order_number
,x.line_number
,x.tnc_pid
,EXTRACT (VALUE (d), 'LicenseDetailsRes/ResponseCode/text()').getstringval () status
,EXTRACT (VALUE (d), 'LicenseDetailsRes/quantity/text()').getstringval () pak_quantity
FROM xxcfi.xxcfi_vt_tnc_pak_details x
,TABLE (XMLSEQUENCE (EXTRACT (x.output_xml, '/LicenseDetailsRes'))) d
WHERE x.order_number = 50403901
AND x.line_number = 2
AND x.tnc_pid = 'R-LMS-4.0-100-K9';

View 2 Replies


ADVERTISEMENT

XML DB :: APEX Soap Web Service Response Into DB

Oct 29, 2013

How do i get a response from a soap webservice and insert it into a DB

View 0 Replies View Related

SQL & PL/SQL :: Extracting Data From LONG RAW Data Type Column

Oct 7, 2011

I have come one requirement where i need to extract data from a LONG RAW data type column.

View 7 Replies View Related

PL/SQL :: Extracting Data From XML Message

May 15, 2013

Currently, I am running 4 separate queries in order to retrieve specific data from a XML file. Is there a way of extracting all 4 values via XML tags in a single query - e.g. :

Message Reference     UTL_RAW.CAST_TO_VARCHAR2 (dbms_lob.substr(message_content, 2000, 2303))
456123               >(Cancelled)</UploadError>
456123               >4561</UserId>
456123               >1234</SecurityIdentifier

At the moment, I am extracting the required info as follows.

Example query 1: message_content, 2000, 2303 > retrieves starting point for an error header

select ml.message_reference, UTL_RAW.CAST_TO_VARCHAR2 (dbms_lob.substr(message_content, 2000, 2303))
from table.msg_archive ma, table.msg_log ml
where ma.message_id = ml.message_id
and ml.message__cd = 'MP_XML'
and ml.message_reference in (456123)

Once retrieved, I transfer to Excel and use a formula to extract the specific header (e.g. using =MID(B1,1,11))

Example query 2: message_content, 2000, 581 > retrieves the starting point for a user id.

select ml.message_reference, UTL_RAW.CAST_TO_VARCHAR2 (dbms_lob.substr(message_content, 2000, 581))
from table.msg_archive ma, table.msg_log ml
where ma.message_id = ml.message_id
and ml.message__cd = 'MP_XML'
and ml.message_reference in (456123)

View 13 Replies View Related

PL/SQL :: Extracting Data From A String

Oct 4, 2013

This is my sample data: 

WITH table_data
AS (SELECT 'ABC12345*Z23*1234*Cheese*24/02/2011' str FROM DUAL
UNION ALL
SELECT 'Aasda1ewr3345*A32345*1234*Bread*01/11/2012' str FROM DUAL
UNION ALL
SELECT 'dsf31212*TEST*124234*Blue*06/07/2007' str FROM DUAL
[code].........

 I can extract the data from before the first *, but I need to also be able to extract the data from between the 1st and 2nd *s, e.g. Z23, A32345, TEST, THIS and THAT from the sample data above. 

View 4 Replies View Related

Client Tools :: Not Extracting All Of The Data

Jan 30, 2013

I exported and imported data from one oracle database to another, but not all the data got loaded in to the destination database. Basically it is filtering the data. Can it be because of the reason that the sql developer may be an express edition?

View 4 Replies View Related

PL/SQL :: Extracting Data From XML And Inserting Into Table

Aug 8, 2013

I have an XML  of the following format:

<data>
<students>
<student>
<studentname>Raymond<studentname>
<StudentId>1</StudentId>
<StudentAge>11</StudentAge>
<StudentMark>0</StudentMark>
</student>
</students> 

Now i have to insert this xml into DB , the table consist of following columns  ( row number , property name , value )  Expected out put is   (1,student name,Raymond) ,( 1, studentid , 1) ( 1, studentAge, 11) (1,Studentmark , 0) The challenges here is

1. how to get the tag names  and populate the property name column ?
2. The number of properties for a student can be variable , How can i deal with them ?

View 8 Replies View Related

SQL & PL/SQL :: Extracting Data From XML File - Not Working?

Oct 4, 2012

I need to extract the values from XML file.I tried with method described in below links -

[URLs]....

My XML file is -

<?xml version="1.0" ?>
<!DOCTYPE main [
<!ELEMENT main (DATA_RECORD*)>
<!ELEMENT DATA_RECORD (STATE_CODE?,JOB_NAME?,WC_CODE?,JOB_ID?,STATUS?,LOG_MESSAGE?)+>
<!ELEMENT STATE_CODE (#PCDATA)>

[code]...

The query is not returning any rows.

View 3 Replies View Related

SQL & PL/SQL :: Extracting Blob Data Using Oracle Function?

Jul 26, 2012

Below is the function code used to extract data from blob column. The function works fine when the blob data length < 2000 bytes. When it is more than, it is throwing an error as below.

Table name: mr_test
Columns: id number
seo blob

CREATE OR REPLACE FUNCTION fn_mr_blob(in_id IN number) return varchar2
IS
len NUMBER;

[Code]....

ORA-01489: result of string concatenation is too long

when I replcae the

"SELECT myvar||trim(dbms_lob.substr(seo,bytelen,vstart)) into myvar FROM mr_test WHERE id = in_id;"
with
SELECT trim(dbms_lob.substr(seo,bytelen,vstart)) into myvar FROM mr_test WHERE id = in_id;
myvar1 := myvar1||myvar;
ORA-06502: PL/SQL: numeric or value error: character string buffer too small

View 1 Replies View Related

PL/SQL :: Extracting Data In A String Separated In Brackets

Jun 7, 2012

I have a scenario where I have to extract data in a string which is enclosed in [].

Here is what I want to do..

input:

[name_first] [name_mi] [name_last]

required output: this should return all the data that is enclosed in the brackets.
name_first
name_mi
name_last

I have tried the "REGEXP_SUBSTR" but my database version is 9i, and it is available only from 10g.

View 3 Replies View Related

PL/SQL :: Download Data Through Web Service

Sep 12, 2013

We have a requirement to download data from SAP system to our Oracle DB. Issue is we will not be able to connect to SAP DB. They will provide a webservice and we should use that by passing parameters. My query is, how can we do that in Oracle DB. I want to write a Program unit and call web service whenever required. 

View 5 Replies View Related

Networking And Gateways :: ORA-12504 / TNS Listener Not Given SERVICE-NAME In CONNECT-DATA

Oct 4, 2011

I am trying to connect to Oracle 11g using ODBC.I created a data source name from Admistrative Tools->ODBC Data Sources.I selected Oracle in OraClient11g_home1 as the driver. I tested the connection and it was succesful.I tried to connect from visual studio. I used the Data Source as Microsoft ODBC Data SOurce. Selected my DSN from drop down (LORAC). I gave the user name and password and got the followign errors:

ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA

[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed

This is my tnsnames.ora located in C:oracleproduct11.1.0client_1
etworkadmin directory.
# tnsnames.ora Network Configuration File: C:oracleproduct11.1.0client_1
etworkadmin nsnames.ora
# Generated by Oracle configuration tools.
LORAC =
(DESCRIPTION =

[code]...

When i do tnsping LORAC, i get OK. When I do tnsping of the other service name i get Failed. However when I try to connect to that service from Visual studio I get a differnt set of errors:

ORA-12154: TNS:could not resolve the connect identifier specified

[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed

I had assumed that as the test connection from ODBC Administrator had worked I would be able to connec to my database from viusal studio. Is there something wrong in my tnsnames.ora? The content or its directory location?

View 8 Replies View Related

Data Guard :: Listener Does Not Currently Know Of Service Requested In Connect Descriptor

Aug 30, 2010

We are trying to configuration the Dataguard in Oracle Database 10g Enterprise Edition Release 10.2.0.1.0. While we check the lsnr configuration the following error has occured.

SQL> select name from v$database;
NAME
ACCLDATA
SQL> select status,error from v$archive_dest;

STATUS ERROR
VALID
ERROR ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
INACTIVE
INACTIVE
INACTIVE

[code]...

View 3 Replies View Related

SQL & PL/SQL :: Extracting Long Raw Columns

Jun 24, 2010

I'm creating a package function that would return the image from the table HR.PER_IMAGES.

Here's the table description of HR.PER_IMAGES
IMAGE_ID NUMBER(15)
IMAGE LONG RAW
PARENT_ID NUMBER(15)
TABLE_NAME VARCHAR2(30)

I have also created a simple PL/SQL code that would supposed to extract the value of the IMAGE column and store it in a variable then return it from a function.

DECLARE
x LONG RAW;
BEGIN
SELECT image
INTO x
FROM per_images
WHERE parent_id = :p_parent_id
;
END;

However, I'm getting the "ORA-06502: PL/SQL: numeric or value error" message. I have tried retrieving an specific image using Oracle Reports Developer and when I queried it was able to render the image on the report page.

View 2 Replies View Related

SQL & PL/SQL :: Extracting Part Of A String

Jan 9, 2013

To make SQL query to before and after specific character.

Create table test(flist not null VARCHAR2(200));

First field content with below record:

FC028CONNE_IMPORT_WRONG_COMP_LENGAPXXXXPPPP
FC024CALL_FUNCTION_OPEN_ERRORAPXXXXPP
FC025OPEN_DATASET_NO_AUTHORITYAPXXXXPPPPPPPPPPPPPP
FC015RAISE_EXCEPTIONAPAXEPPPPPPPPPPPPPPPPPPPP

to filter the above record from FLIST column thorugh sql script as below:

FC028< CONNE_IMPORT_WRONG_COMP_LENG> APXXXXPPPP
FC024< CALL_FUNCTION_OPEN_ERROR> APXXXXPP
FC025< OPEN_DATASET_NO_AUTHORITY> APXXXXPPPPPPPPPPPPPP
FC015< RAISE_EXCEPTION> APAXEPPPPPPPPPPPPPPPPPPPP

means remove first 5 charator and after APXXXXXXXXX.

Output of SQL query should come like below:

CONNE_IMPORT_WRONG_COMP_LENG
CALL_FUNCTION_OPEN_ERROR
OPEN_DATASET_NO_AUTHORITY
RAISE_EXCEPTION

View 24 Replies View Related

SQL & PL/SQL :: Extracting Date From Timestamp?

Jan 18, 2012

How to extract date from a timestamp data

for example

Input-15/06/2010 05:30:00.000000
output: 15/06/2010

View 3 Replies View Related

Target Name Space Response Is Low?

Feb 27, 2013

We are using oracle 10.2.0.3.0 version on HP-UX B.11.23 U ia64.

We are facing a lot of delay in TNS ping reply. It is taking 8000+ msec.

$ tnsping XXXXXX 20

TNS Ping Utility for HPUX: Version 10.2.0.3.0 - Production on 27-FEB-2013 12:37:15

Copyright (c) 1997, 2006, Oracle. All rights reserved.

Used parameter files:
$ORACLE_HOME/network/admin/sqlnet.ora

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = xxxxxx)(PORT = 1531))) (CONNECT_DATA = (SERVICE_NAME = xxxxxxx)))
OK (1250 msec)
OK (1150 msec)
OK (860 msec)
OK (860 msec)
OK (790 msec)
OK (810 msec)
OK (790 msec)
OK (570 msec)
OK (650 msec)
OK (630 msec)
OK (790 msec)
OK (1240 msec)
OK (1090 msec)
OK (1030 msec)
OK (870 msec)
OK (690 msec)
OK (740 msec)
OK (650 msec)
OK (490 msec)
OK (560 msec)
$

View 2 Replies View Related

SQL & PL/SQL :: Extracting User Who Does Not Exist In Column

Oct 30, 2012

I have two tables.

First one is

STAFF
======
STAFFNUM NAME
======== ====
1 A
2 B
3 C

SUBJECT
=======
SUBCODE SUBNAME LECTURER
======= ======= ========
A1 ABC 1
A2 EFG 2
A3 HIJ 1

I did the following query

SELECT STAFF.STAFFNUM, STAFF.NAME, SUBJECT.LECTURER
FROM STAFF,SUBJECT
WHERE STAFF.STAFFNUM NOT IN SUBJECT.LECTURER

It will show me..

B and C is not teaching A1.
A and C is not Teaching A2.
B and C is not teaching A3.

This is not what I want.

What I want is to show who is not teaching any subjects.So the expected result is only C coming out.

View 10 Replies View Related

SQL & PL/SQL :: Extracting Values Acquired Via UTL_TCP?

Jul 26, 2010

Using UTL_TCP package (for the first time; maybe there's smarter way to do that), I captured contents of a certain web page. The page contains (along with some text, images, etc.), a list of values I'd like to extract. Something like this:

PRVI miravira pond 23.7.2010 102,2221
NEKI miravira pond 23.7.2010 105,0996
DRUGI miravira pond 22.7.2010 101,3789

The result (output) of the PL/SQL procedure contains several hundreds of lines. I narrowed the output to a part which I'm interested in. It looks like this (a screenshot, because [code] or [pre] tags won't allow me to paint text, while the others don't preserve formatting):

Red values are what I'm looking for. The first one represents a date (July 23rd 2010), and the second one is amount (105,0996).

Now, what's the problem: the above mess doesn't look the same every day (probably because the rest of data that appears on a web page changes too). Therefore, SUBSTR (with hard-coded positions) that seems to be working today is wrong tomorrow. Moreover, IF condition I used might not provide desired part of a web page every time.

Here's the code (modified a little bit, unimportant for what matters):

declare
c utl_tcp.connection;
n number;
buffer varchar2(255);
l_x_dat varchar2(10);
l_x_izn varchar2(10);

[code].....

L_X_DAT and L_X_IZN are values I need. SUBSTR parameters, as I said, are far from being good.Is there any smart way to extract those two values? What (Oracle) technology could be used here? Or should I just try to, somehow, set SUBSTR values correctly (dynamically)?

If there was a way to uniquely fetch those values (instead of getting the whole web page and digging for what I'm interested in), it would be extraordinary.

View 11 Replies View Related

Extracting Table Relationships In Oracle

Sep 30, 2008

I have requirement of extracting the relationships between all tables in the Database(Oracle 10.2.02) created by CA Unicenter Servicedesk.

Tell me about any tools/scripts which I can use to extract this information. I can do it manually, but it is time consuming.

View 4 Replies View Related

RAC & Failsafe :: DNS Response Time For Nodes

Feb 24, 2011

I'm trying to install 2 nodes oracle RAC 11gR2 on SLES11. I configured DNS for public,virtual, private and scan IPs. when I check with nslookup, everything seems ok. but when I run runcluvfy.sh, it says that:

" PRVF-5636 : The DNS response time for an unreachable node exceeded 15000 ms on following nodes: rac1,rac2"

How can I decrease the response time?

View 4 Replies View Related

Script To Check Response Time?

Nov 27, 2012

customer have a monitoring system that execute a script to check response time db (9i database).

The script do the following steps:

- Date
- select count(*) from all_tables
- select count(*) from v$lock
- Date

And then calculate the gap from end and start date, this is the response time.So, response time change from db to db depending on number of tables.

Is there any different method or different object to use?

View 14 Replies View Related

Drop Table Response Time?

Jul 23, 2012

I am working on 10.2.0.4 oracle version database of my production,

when executed a simple drop command , the total time it took is 26 secs. on Avg. the table is holding only 20 records. this is happening for the last few weeks , prior to that it took less than 0 secs.

05:22:58 SQL> drop table C$_100GL_INTERFACE ;

Table dropped.

Elapsed: 00:00:26.67

but on successive executions the elapsed time falls to 10-15secs.

And on the same test env, we are achieving the expected results less than 0 secs.

View 15 Replies View Related

SQL Response Time (Oracle 11g Win 2003)?

Mar 5, 2013

My SQL Response Time is more ttan 100% and keeps on increasing. How can I fix this? The Application users are complaining that the system is very slow.

View 2 Replies View Related

PL/SQL :: Create XLS File From SOAP RESPONSE

Nov 18, 2013

I am working on web services. im getting soap response and i need it to be, created as xls file.i have used DBMS_XSLPROCESSOR.CLOB2FILE  it throws error while opening in excel. Is there any other way.

View 5 Replies View Related

JDeveloper / Java & XML :: Extracting Values From String

Aug 11, 2012

I would like to extract only the values from the XML string. The xml string looks like

<addressId>1</addressId><addressSource xsi:nil="true"/><addressInfoName xsi:nil="true"/><addressLine1>245 Murray Ln SW Bldg 14</addressLine1><addressLine2 xsi:nil="true"/><addressLine3 xsi:nil="true"/><addressLine4 xsi:nil="true"/><phoneNumber xsi:nil="true"/><phoneNumberExt xsi:nil="true"/><city>Washington</city><county xsi:nil="true"/><stateOrProvince>DC</stateOrProvince><ZIPCode>20528-1002</ZIPCode><country>USA</country><congressionalDistrict xsi:nil="true"/></address>

And the expected output is
245 Murray Ln SW Bldg 14
Washington
DC
20528-1002
USA

I need to extract only the values from the XMl string using sql.

View 4 Replies View Related

SQL & PL/SQL :: How To Retain Special Characters While Extracting From DB In UNIX

Jul 16, 2013

In my DB there are special characters are stored like "Świętochłowice". So in Unix script while extracting these characters, I have used
export LANG="universal.UTF-8" in order to make it English. which works fine.

But my question is how to retain this special character intact as, it is in DB?

So in UNIX script
export LANG="universal.UTF-8"
sqlplus -s uname/pwd@hostname/schema << ENDSQL | sed -e "s/Connected.//" -e "/^$/d"
set pagesize 0 feedback off verify off heading off echo off serveroutput on size 10000
spool /path/out.txt
Select name from tablename where is=12;
spool off;
exit
ENDSQL

Output is "Swietochlowice" (makes sense),but how to get the output as "Świętochłowice" which is in DB? I have tried different NLS_LANG option, but no success.

View 5 Replies View Related

Oracle Response Time In A HTML Table

Apr 24, 2013

How do you Display Response time in HTML? I want to run a PHP script that displays the oracle response time in an HTML table.

View 1 Replies View Related

Windows :: Set Values For Best Performances In Response Time?

Jun 12, 2013

I need to create a DB on a pc with 4GB (RAM). I can use the assistant but where I need to set correctly a value related to the memory? Is it necessary to set values for best performances in response time?

View 2 Replies View Related

Application Express :: Jasper Response Parsing?

Nov 7, 2012

I have a lot of problems in parsing SOAP web service response of Jasper The major problem is that the report document in the response appears at the end of the response. It appears even after the closing tag of the soap response. The images in the response are returned in binary form.

Because the response is partially binary and partially characters so I am not able to parse it correctly. If i make a web service call using APEX webservice references and then put the response in a collection then I get an error. I guess APEX collections are not able to handle this response. I say this because If I call the webservice using UTL_HTTP, then I get the response.

parsed a Jasper SOAP web service response which has a report in it.I have gone through h[URL]..but I am not using it.My question is focused on parsing the response and not on finding other ways of getting it

View 9 Replies View Related







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