Sitemap

Amicuk Programming Answers

How to extract a string value from a varchar column

-0001-11-30   Views:0

Advertisement

Hi, I've a varchar2 column which has got xml data. I want to extract the value of some tag <test></test> I can't use EXTRACT as the column is not XMLTYPE. Please suggest.Hi, make a new temporary table table wirth columns as the same name as TA

Hi,
I've a varchar2 column which has got xml data. I want to extract the value of some tag <test></test>
I can't use EXTRACT as the column is not XMLTYPE.
Please suggest.

The replay answer
Advertisement
Hi,
make a new temporary table table wirth columns as the same name as TAGS in your XML.
extract the XML in a temporary variable.
pass it to the below proc with the table name created in step1 , it will populate the temporary table with the XML data.
PROCEDURE prc_save_xml(
iv_table_name IN VARCHAR2,
ic_xmlstring IN CLOB,
on_count OUT NUMBER,
ov_remarks OUT VARCHAR2,
ov_status OUT VARCHAR2,
iv_row_tag IN VARCHAR2 DEFAULT 'ROW'
) IS
insctx dbms_xmlsave.ctxtype;
doc CLOB;
BEGIN
--Get a context handle
insctx := dbms_xmlsave.newcontext(iv_table_name);
dbms_xmlsave.setdateformat(insctx, 'YYYYMMDD');
dbms_xmlsave.setrowtag(insctx, iv_row_tag);
ov_remarks := 'Inserting now';
on_count := dbms_xmlsave.insertxml(insctx, ic_xmlstring);
ov_remarks := 'Inserted now';
dbms_xmlsave.closecontext(insctx);
--set return status as Success
ov_remarks := 'Sucess';
ov_status := gv_success;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.put_line('IN OTHERS :' || SQLERRM);
ov_status := gv_failure;
ov_remarks := ov_remarks || ':' || SQLERRM;
on_count := 0;
END prc_save_xml;

Go to See the other 11 answers

How to extract a string value from a varchar column

Category:DefaultRelease time:-0001-11-30Views:130

Hi, I've a varchar2 column which has got xml data. I want to extract the value of some tag <test></test> I can't use EXTRACT as the column is not XMLTYPE. Please suggest.Hi, make a new temporary table table wirth columns as the same name as TA[More]

How to extract sub string value from a string?

Category:DefaultRelease time:2015-10-11Views:130

Hi, I need to know how can i extract sub strings from a main string, something like this: main variable-------->"2087-5E2SE-19-JG7BC" i want to split it into like this: sub_main_1 variable---------> "2087" sub_main_2 variable----[More]

Subject: extract the string before space

Category:DefaultRelease time:-0001-11-30Views:130

I have a string say "aquarium a". i want to extract the string appearing before the space and discard the string appearing after space. that is the resultant string required is "aquarium". any number of characters can appear after spac[More]

Data extraction from string

Category:DefaultRelease time:-0001-11-30Views:130

I'm trying to search a particular value in a string file. The string contains many parameters followed by their values and units. I want to identify and extract, as a number, the value of a particular parameter. The program will basically ask the use[More]

How can i extract data strings (temp. press. rel.hum etc) using a Virtual interface through an RS-232 connection​?

Category:DefaultRelease time:-0001-11-30Views:130

How can i extract data strings (temperature, pressure, relative humidity etc) using a Virtual interface through an RS-232 connection?Try this.  It is in LV 8.5. Note the double % in the format string.  This is so the % in the input string is treated[More]

Extract numeric string in string

Category:DefaultRelease time:-0001-11-30Views:130

I want to extract numeric string from astring. it should stop reading if it hits an alphabet that is requirement.it is not that numeric string is of fixed lenght but it will be in begining. example:78965rocksalt result:78965.Hi, use fm PREPARE_STRING[More]

Is this a proper way to check if a string exist in a db-column?

Category:DefaultRelease time:-0001-11-30Views:130

I don't know I am posting this in the right forum... anyway... I am trying to check if a string as an email address exist in a database with jsp (by returning true if the string exist). I have managed to do it but I am not sure if this is the best wa[More]

Select-String to search only first column in .CSV

Category:DefaultRelease time:-0001-11-30Views:130

Hello all, I'm wondering if anyone knows a way to only search the first column of a .CSV file using Select-String. I guess I could probably import-csv and pipe the first column to select-string, but I was wondering if Select-string has this capabilit[More]

How to get string (specified by line and column) from txt file with labview

Category:DefaultRelease time:-0001-11-30Views:130

Hi everyone How to get string (specified by line and column) from txt file with labview thx  Solved! Go to Solution.As far as I know, a text file has no columns.  Please be more specific.  Do you mean something like the 5th word on line 4, where word[More]

SQL Extract Variable String in Variable Position with Variable length from ntext field

Category:DefaultRelease time:-0001-11-30Views:130

i want to extract a variable string from an ntext field.  Sample Data in Background_text (ntext) function changeFocus()  {         document.getElementById('skipContent').style.visibility = 'visible';         document.getElementById('flashContent').bl[More]

Request help for Extracting CLOB String

Category:DefaultRelease time:-0001-11-30Views:130

Hi Everyone, I am getting the input string in the form of CLOB delimited by '~'. I have to tokenize the string and insert those values into the below table through procedure / function. Create table TEST_TEMP ( NUM NUMBER(10), NAME VARCHAR2(1000), DE[More]

Hot
Hi all,           The system is live for few months and now we had a problem with a download of a customer. The problem was related to incorrect taxes configuration. Now we corrected the taxes mapping between R/3 to CRM in R/3.  The same configuratio [More]
hi!!! Could you pls point to any code example. thanks Pushpa "Richard Berger" <[email protected]> wrote: > Manoj: Thanks for the answer - do you have or can you point me at any code samples that accomplish this? (Yes, .NET is limi [More]
hi , Am planning to install intially oracle EBS R12 in windows web server 2008 R2. Is this OS supported by oracle? Did anybody already done this ? also later am planning to install OBIA + OBIEE stack on this. will all these supported on windows web s [More]
Hi, I have a problem of choosing communication channel after/during message mapping. In message mapping I perform lookup into database table and according to return value i need to choose communication channel. Return value from table is inserted to [More]
I have a Panasonic TX32LXD70 with my ATV connected using HDMI, the TV is set to go to the DVB-T tuner when switched on. Before the "Take 2" update this worked fine but since upgrading when you turn the TV on it switches to ATV after about 10 sec [More]
Hello, everyone. In linux, adobe runs slow, I use adobe 8.0, and I have to wait for one second just page-up and page-down. If I search for some keywords in the document, I have to wait for more time. Is there any tip to speed up the adobe speed? Or i [More]
an error of 'Option tag must be nested in a Select tag' ocurs when i'm trying to use a pull-down menu as a taglib. I can't seem to solve the problem for this error...it means you have option tags defined and they aren't nested in select tags: <xxx:op [More]
I need to create items to place on a tray. So if I have a tea, coffee, glass of water, salt, sugar, etc. What is the best way to program this? I am thinking of having a tray class which has an array of TrayObject Types. This will set a limit to what [More]
unexpected failure: Error:Only x32 JVM supported java.io.IOException: Error:Only x32 JVM supported at com.adobe.air.ipa.IPAOutputStream.addInitialContent(IPAOutputStream.j ava:142) at com.adobe.air.ipa.IPAOutputStream.addFile(IPAOutputStream.java:96) [More]
Hi, I have a big problem that seems very easy, but I can't find a solution on internet. The problem is. I have a rectangle, all angles are 90 degrees, I know that. But how can I make Illustrator to measure this???? Using Window - info I really don't [More]