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
Dear Experts,                              i have updated  MPS in MD61, the period indicator was  M (monthly),  after  MRP run, system  generating schedule  lines  on daily basis for Scheduling Agreement(ME38), i want  schedule lines   on mpnthly bas [More]
I have already contacted skype by e-mail.  It has been over 7 days now, since my e-mail was assigned to somebody at skype.  Nobody has responded yet.  I have also tried chat support, but it just keeps me waiting for long periods of time. Why isn't th [More]
Dear All, We have the release strategy at PO level on 3 parameters, Purchasing Group, Value and Document type.. for each parameter we have created the characteristics EKKO- EKGRP, EKKO-BSART, EKKO-GNETW. Till date system is working ok and trigreeeing [More]
Any assistance is appreciated.Adobe Flash Player 11.8.800.42 is the most recent version from Adobe. It is a pre-release version. I am using it without any noticeable problems. The current stable version is Download 11.7.700.169.Read other 5 answers [More]
hi, Please solve this.. If the structure is like this, is it possible to content conversion in source sender JMS Adapter. the source the structure is as below: <?xml version="1.0" encoding="UTF-8"?> <ns0:MT_Mapping> xmlns:n [More]
Hi, I'm french, sorry for my English. I have Adobe acrobat pro extensed 9. When i generate a PDF file with a WORD, i have a problems. In word 2007 : In PDF : Thank you for your helpConverting Word (table) to pdf - lines screwed up - googled as far ba [More]
This is a replacement serial number that I am typing in.  I got it from a technician and was told to use it rather than my old serial number.  I would appreciate some help on this.First of all, are you entering your serial number from an administrato [More]
Hello. I have a question regarding disk permissions. I have a external drive with info from another drive that was almost dieing that will now not allow me to make changes on it. I have tried to reset the ACL with the Installation Disks, opened up us [More]
my add-ons has been hijacked and the garmin url immediately replaces add-ons and I lose the functionality of add-ons. Thank you.It could be the work of one of your add-ons, or even add / mal-ware. Look thru your add-ons list and make sure you know wh [More]
guys please help me out!!!!!!!!!!!!!!  first, it got the problem app error 523 reset. then i searched for solutions on the internet then i found it but whats wrong is that i thought the my phone was curve 8520 so i have installed a OS for blackberry [More]