the value of the xml column type tag data BLOB
HelloI'm on Oracle 10 g.
I have a table that has a column as BLOB data type and contains XML data. I need to select specific table records according to a unique tag value of the xml data in the BLOB column. For example:
The table say Test has two columns: id (integer) and MESG (BLOB)
The xml in the MESG column message is assumed:
< message >
< > 123456 contactphone < / contactphone >
< contactname > ABCD < / contactname >
< amount > 9999 < / amount >
< / message >
I need to extract only the records where the amount is = 9999
Help, please. Thanks in advance.
user12850338 wrote:
Hi BluShadow,
Thanks for your reply.
I confess that if we would have used type xml in the first place, things would have been easier.
For example, I mentioned three tags in the xml file, but my real data contains some hundreds of tags... :( So it will always be a good idea with this approach.
Yes, it's a good approach. Oracle has provided built-in XML functionality to manage XML, then of course it's the best thing to use. :)
For example, you can easily deal with namespaces and repeating nested groups and flatten the data in a table structure. for example
SQL> ed
Wrote file afiedt.buf
1 WITH t as (select XMLTYPE('
2
3
4 1
5 1800
6
7 1
8 28
9 6
10 12
11
12
13 5
14 19
15 1
16 90
17
18
19
20 2
21 2400
22
23 3
24 14
25 7
26 5
27
28
29 ') as xml from dual)
30 -- END OF TEST DATA
31 select x.country, x.point, y.user_id, y.target, y.state, y.task
32 from t
33 ,XMLTABLE(XMLNAMESPACES('http://www.w3.org' as "aa"),
34 '/RECSET/aa:REC'
35 PASSING t.xml
36 COLUMNS country NUMBER PATH '/aa:REC/aa:COUNTRY'
37 ,point NUMBER PATH '/aa:REC/aa:POINT'
38 ,user_info XMLTYPE PATH '/aa:REC/*'
39 ) x
40 ,XMLTABLE(XMLNAMESPACES('http://www.w3.org' as "aa"),
41 '/aa:USER_INFO'
42 PASSING x.user_info
43 COLUMNS user_id NUMBER PATH '/aa:USER_INFO/aa:USER_ID'
44 ,target NUMBER PATH '/aa:USER_INFO/aa:TARGET'
45 ,state NUMBER PATH '/aa:USER_INFO/aa:STATE'
46 ,task NUMBER PATH '/aa:USER_INFO/aa:TASK'
47* ) y
SQL> /
COUNTRY POINT USER_ID TARGET STATE TASK
---------- ---------- ---------- ---------- ---------- ----------
1 1800 1 28 6 12
1 1800 5 19 1 90
2 2400 3 14 7 5
SQL>
Tags: Database
Similar Questions
-
Validate the XML column when inserting
Hello
I'm on 11 GR 2.
I have a table
create table root_table (id number, text xmltype);
I tried to sign up:
Start
dbms_xmlschema.registerSchema ('test', xmltype)
"' < xs: schema xmlns: XS ="http://www.w3.org/2001/XMLSchema"xmlns:xdb ="http://xmlns.oracle.com"elementFormDefault ="unqualified">
< name XS: complexType 'RootType' = >
< xs: SEQUENCE >
< xs: element name = "Required" / >
< xs: element name = "Énumération" >
< xs:simpleType >
< xs:restriction base = "XS: String" >
< xs:enumeration value = 'A' / >
< xs:enumeration value = 'B' / >
< xs:enumeration value = 'C' / >
< / xs:restriction >
< / xs:simpleType >
< / xs: element >
< xs: element name = "MinLength" >
< xs:simpleType >
< xs:restriction base = "XS: String" >
< xs:minLength value = "4" / >
< xs:maxLength value = "20" / >
< / xs:restriction >
< / xs:simpleType >
< / xs: element >
< xs: element name = "MaxLength" >
< xs:simpleType >
< xs:restriction base = "XS: String" >
< xs:minLength value = "1" / >
< xs:maxLength value = "4" / >
< / xs:restriction >
< / xs:simpleType >
< / xs: element >
< xs: element name = "MaxOccurs" type = "xs: String" maxOccurs = "2" / >
< xs: element name = "MinOccurs" minOccurs = '2' maxOccurs = "2" / >
< xs: element name = "Optional" type = "xs: String" minOccurs = "0" / >
< / xs: SEQUENCE >
< / xs: complexType >
< xs: element name = "root" type = "RootType" xdb:defaultTable = "ROOT_TABLE" / >
((< / xs: Schema > '));
end;
/
table should point to the table where the XML column is default, I guess that
is the 'root' in the same line a reference to the name of the xmltype column?
Now - how do I ensure the XML I have insert in the column "change" is validated against the schema above?
concerning
Mette
For both options, save the diagram with these options (you can substitute the url of course):
Start
() dbms_xmlschema.registerSchema
schemaURL-online "test.xsd.
schemaDoc-online xmltype (bfilename ('TEST_DIR', 'test.xsd'), 873)
local-online true
genTypes-online fake
genTables-online fake
enableHierarchy-online dbms_xmlschema. ENABLE_HIERARCHY_NONE
options-online dbms_xmlschema. REGISTER_BINARYXML
);
end;
/
Then the #1 option:
create table root_table)
Identification number
text xmltype
)
XMLType column can store as xml binary securefile
XmlSchema 'test.xsd' element 'root '.
;
SQL > insert into root_table values (1,
2 xmlparse (document
3'
')4
5
A 6
XXXX 7
12345 8
9
10
11
(12);
insert into root_table values (1,
*
ERROR on line 1:
ORA-31061: error XDB: XML error event
ORA-19202: an error has occurred in the processing of XML
LSX-00222: "12345" is too long (maximum is 4)
SQL >
SQL > insert into root_table values (1,
2 xmlparse (document
3'
4
5
A 6
XXXX 7
1234 8
9
10
11 ')
(12);
insert into root_table values (1,
*
ERROR on line 1:
ORA-31061: error XDB: XML error event
ORA-19202: an error has occurred in the processing of XML
LSX-00213: only 1 occurrences of the 'MinOccurs' particle, the minimum is 2
SQL > insert into root_table values (1,
2 xmlparse (document
3'
')4
5
D 6
XXXX 7
1234 8
9
10
11
12
(13);
insert into root_table values (1,
*
ERROR on line 1:
ORA-31061: error XDB: XML error event
ORA-19202: an error has occurred in the processing of XML
LSX-00290: invalid enumeration choice "D".
SQL > insert into root_table values (1,
2 xmlparse (document
3'
')4
5
A 6
XXXX 7
1234 8
9
10
11
12
(13);
1 line of creation.
For the #2 option:
create table root_table2)
Identification number
text xmltype
)
XMLType column can store it as clob securefile
;
create or replace trigger root_table2_biu_t
before the insert or update
on root_table2
for each line
declare
doc xmltype: =: new.tekst.createSchemaBasedXML ('test.xsd');
Start
doc.schemaValidate ();
end;
/
SQL > insert into root_table2 values (1,
2 xmlparse (document
3'
')4
5
D 6
XXXX 7
1234 8
9
10
11
12
(13);
insert into root_table2 values (1,
*
ERROR on line 1:
ORA-31154: invalid XML document
ORA-19202: an error has occurred in the processing of XML
LSX-00290: invalid enumeration choice "D".
ORA-06512: at "SYS." XMLTYPE", line 354
ORA-06512: at DEV. "" ROOT_TABLE2_BIU_T ", line 4
ORA-04088: error during execution of trigger ' DEV. ROOT_TABLE2_BIU_T'
Both options will perform a validation of strict type.
There are other possible configurations, such as CLOB based on a storage schema, but this approach is now obsolete.
If you are only interested in whether the XML instance is valid or not, you can also use a constraint check with the XMLisValid function.
-
Settings for the right column div tag
Hi guys
Inside my base model home page, I want a column on the right that starts at the top right under the header. This will serve to show the news and contact and so.
I have a separate div for the text on the left and a div to the right column. The right div is set to "position: absolute" because he must remain top-right under the header.
But as you can see on the screenshot, social media icons that are part of the model appear just below the div to the left.
How can I configure the right column div tag to keep it at the top right, the text on the left remains where it is and that the right column corresponds to the div model so that social media icons will be displayed automatically below the contact information on the right.
The second screenshot shows the result as it should be for the social media icons, so below all the content of the page.
Some fundamental fixes you should do first:
- Yourtag begins after you have already a meta tag and tag style open on your page. Solve this problem
- For this reason, the tag appears as away during validation. If you set the point #1, this should be resolved
Now coming to your question in the discussion.
You have
more than once on your page. It's illegal markup. ID can only be used once per page. If you want to repeat the same style for more than 1 item, make a class and style it in CSS with .body_right instead of #body_right. In this way, you can re - use this element never how many times you want.In the file/styles/style. CSS, line 2200:
{#column_right}
Display: block;
position: absolute;
high: 25;
Width: 25%;
left: 75%;
z-index: auto;
}
Who to change:
{#column_right}
Display: block;
float: right;
Width: 25%;
}
Get rid of everything that isn't here in my code above ^.
See how your position elements / line up and post back if you need assistance.
-
How to write the xml content of a file (Blob data Type) with other columns in file system
Team,
We are currently working on oracle 11 g. Suppose that we consider the SCOTT. EMP table for our creation of the table.
All existing columns of SCOTT along. EMP table allows to assume that this table has an additional column name emp_xml, which is of TYpe of BLOB data and it holds xml data.
the size of the data blob for each record in this col is greater than 32 KB (normally about 1 GB), now I want to write the contents of this column along
with enmae, empno, hiredate into an external file. Assume that if we are only to the BLOB column that is emp_xml then the code below worksStart
for c in (select emp_xml from your_table)
loop
dbms_xslprocessor.clob2file (emp_xml.getclobval (), 'YOUR_LOCATION', 'YOUR_DYNAMIC_FILENAME')
end loop;
end;but I want empno, enmae, hiredate with blob emp_xml written in the external file. Any assistance in this case welcome.
Concerning
max_linesize
Maximum number of characters for each line, including the newline character,
for this file (minimum 1, maximum value 32767). If not specified, Oracle
provides a default value of 1024.Defines how much you can read or write to a single call. I have to loop through the clob object and I write a pieces of 1024. So there is no limit to how much she can write. Just test it, IT will WORK!
-
Extract the value of the XML column.
Hello
I'm on 11.2.0.3 and got query
I want to output associated to < type info = "dynamic_sampling" > 2 < / info >:select other_xml from v$sql_plan where sql_id=’2y32qkr40b82a’ and other_xml is not null <other_xml><info type="db_version">11.2.0.3</info> <info type="parse_schema"><![CDATA["LIU"]]></info><info type="dynamic_sampling">2</info> <info type="plan_hash">3882242470</info><info type="plan_hash_2">281948136</info> <peeked_binds><bind nam=":N1" pos="1" dty="2" pre="0" scl="0" mxl="22">c30d51</bind> <bind nam=":N2" pos="2" dty="2" pre="0" scl="0" mxl="22">c30d51</bind> <bind nam=":N3" pos="3" dty="2" pre="0" scl="0" mxl="22">c30d51</bind></peeked_binds> <outline_data><hint><![CDATA[IGNORE_OPTIM_EMBEDDED_HINTS]]></hint> <hint><![CDATA[OPTIMIZER_FEATURES_ENABLE('11.2.0.3')]]></hint> <hint><![CDATA[DB_VERSION('11.2.0.3')]]></hint> <hint><![CDATA[FIRST_ROWS(100)]]></hint> <hint><![CDATA[OUTLINE_LEAF(@"SEL$1")]]></hint> <hint><![CDATA[FULL(@"SEL$1" "LIU"@"SEL$1")]]></hint> </outline_data></other_xml>
dynamic_sampling of name of column
value of line 2
reflection by using dynamic_sampling value as a predicate would be great if:
Select * from v$ sql_plan
where
dynamic_sampling = 2
How to transform the other_xml column to get such results?
Concerning
GregG
Published by: GregG on February 8, 2013 13:14XMLTABLE is a better way to do it as EXTRACTVALUE is obsolete but:
select p.sql_id, extractvalue(h.column_value,'/info') lvl from v$sql_plan p , table(xmlsequence(extract(xmltype(p.other_xml),'/other_xml/info'))) h where p.other_xml is not null and extractvalue(h.column_value,'/info/@type') = 'dynamic_sampling';
11.1 I think the tag can say 'yes' rather than giving level.
If there is no dynamic sampling, there should be no tag dynamic sampling. -
I have an application that loads an XML file information and displays in a dynamic text box. Which works very well. Now, I want to add tags HTML of the information contained in the XML file for the dynamic text box will format. If I add html right:
< Answer1 > Earth, < b > < /b > air, fire and water. < / Answer1 >
I get a null value in the text box. If I encode
< Answer1 > Earth, & gt; b & lt; Air & gt; / & lt; fire and water. < / Answer1 >
It then displays
Earth, the < b > < /b > air, fire and water.
No help on how to code html embedded in an XML document, so a dynamic text box using the html code?
Thank you.Just use CDATA tags around your HTML values, for example:
air, fire and water.]] > HTH.
-
Hide the XML attribute if no data value / doesn't exist
Hello
I have a xsd defined as the following structure:
--------------
< xsd: complexType name = "PersonImageType" >
< xsd: attribute name = "ID" type = "xsd: Integer" / >
< xsd: attribute name = "FileName" type = "xsd: String" / >
< xsd: attribute name = "ErrorMessage" type = "xsd: String" use = "optional" / >
< xsd: attribute name = "Fetched" type = "xsd: String" / >
< xsd: attribute name = "S1" type = "xsd: String" / >
< xsd: attribute name = "S2" type = "xsd: String" / >
< / xsd: complexType >
--------------
When I run my BPEL process, I get the reply/output as follows:
--------------
< PersonImage >
"" < PersonImage ID = "12410276" FileName = "12410276.jpg" ErrorMessage ="" recovered = "Y" S1 = S2 "Y" = "Y" / >
< / PersonImage >
--------------
When you look at the output, the xml 'ErrorMessage' attribute has no value in it.
I want to:
(a) hide this attribute - when there is no data and
(b) display this attribute - when it has all the data.
Very appreciated if someone help me solve this problem.
Thank you and best regards,
Rakeshwithout double quotes around the @ErrorMessage
see you soon
James -
Rename the XML via Javascript tags
Currently, I have a script that detects some paragraph styles and renames them. For example:
var myDoc = app.activeDocument;
var myStyle = myDoc.paragraphStyles.itemByName ("bar SIDE B HEAD");
myStyle.name = "SIDEBAR HEAD of NOTE"I would like to do the same thing with some names of XML tags, preferably as part of the same script. I'm sure it's pretty easy, but for some reason, I can't find any info on how to tell the XML tags!
I looked in the tutorial Scripting InDesign CS4 and Adobe Introduction to scripting, but at this point, I feel I'm wasting my time on a simple problem. Anyone can help out by an amateur?
Thanks in advance,
Matt
Yes you are right Matt, it is very easy.
var myDoc = app.activeDocument; var myTag = myDoc.xmlTags.itemByName("Old"); myTag.name = "New";
Shonky
-
Displays the empty columns instead of data
I grew up a table from data source in the physical layer. I checked the data in the view, and there are data for all columns.
I need to create a report of this table (only). All the fields, I need to create the report exist in the same table. I didn't need another table to create this report.
But just for the sake of creating joins, I joined with a fact table in the physical layer and in the same way, at a table of dimension and/or fact in MDB table.
I created the report and the data is not displayed for columns 4 and 5. It displays empty for these columns.
Help, please.Hello
try to purge the cache of the administrator and close all cursors to manage the side sessions answers then try to run the report.
Also check the properties of the columns in the physical layer to see the length defined for the column. -
change the column type of data in large tables
Hello
I have a very large table 3 TB and 97 scores and I need to extend the size of a column. This operation can take a long time and I'm afraid that it will block some SQL operations. What is the recommended way to do this? Can I use alter column? Should I add the column, copy values, delete the former and rename it?
Kind regards
Nestor BoscanBecause you widen the column, all existing values are guaranteed to fit the new size. This should happen fairly quickly. If you were however decrease the size of a column, each value must be checked first before the DOF could complete to check it might all go in the smaller space. Change the alter table is a great value.
If these fields are variable length (number, varchar2), then the space doesn't have to be 'reserved' for future data. Oracle will take care of the future inserts or updates of larger data as usual. If you increase a fixed length as a CHAR data type, then it is another story.
-
A better way to treat the form as a table with the variable column type?
I wanted to make a column to return according to the status of a flag column as readonly. I have a column defined as follows in the report query.
Decode (sys_flag, 'Y', APEX_ITEM. DISPLAY_AND_SAVE 3, TYPE_CODE, APEX_ITEM. SELECT_LIST_FROM_LOV (3, TYPE_CODE, 'LOV_TYPE_CODE_LOV')) AS TYPE_CODE
To get the SRM process noting that column, I had to put this 'band of HTML code' to 'No', then the column attributes, I put:
"Expression HTML" to "#TYPE_CODE #
' Display under "to"text display (saves the State).
And then it took me to get new lines of work:
"Default of Type" to "Expression of PL/SQL.
'Default' to APEX_ITEM. SELECT_LIST_FROM_LOV (3, NVL(:P18_TYPE_CODE,'LOV_TYPE'), NULL, 'LOV_TYPE_CODE_LOV', ' NO')
This makes large, however submit that it seems that the checksum of line used by MRU included the raw HTML generated by the APEX_ITEM package and not just the value of the column. I worked around this by including an element hidden checksum and creating a process that replaces the checksum generated automatically with my custom.
Is there a better way to intercept this checksum, preferably before it is rendered on the page? I now hide the sum of hidden HTML control in the output HTML of another column, so it's a bit ugly. If not, is there an easier way to achieve what I'm looking for? I tried several combinations, and it seems to work better. It's just a shame there's no way to have a standard hidden column included in the SRM process.Hello
I tried different possibilities and seems to run the following:
Create a report questioning in NORMAL SQL function to help:
SELECT APEX_ITEM.HIDDEN(1,EMPNO) || APEX_ITEM.TEXT(2,ENAME) ename, CASE WHEN DEPTNO = 10 THEN APEX_ITEM.HIDDEN(3, SAL) || SAL ELSE APEX_ITEM.TEXT(3, SAL) END SAL, EMPNO, DEPTNO || APEX_ITEM.MD5_CHECKSUM(ENAME, SAL) DETPNO FROM EMP
Do not specify something special for column definitions.
Create a button that submits the page.
Create a PL/SQL process that runs "On submit - after calculations" and Validations, triggered by this button and using the following code:
BEGIN APEX_ITEM.MULTI_ROW_UPDATE('#OWNER#:EMP:EMPNO,1:,|ENAME,2:SAL,3'); END;
I've done here: http://htmldb.oracle.com/pls/otn/f?p=55041:35
Any element with the value of DEPTNO 10 has the value SAL, read-only, as otherwise it's editable. This is done by creating a hidden input field for the actual value, followed by the text version OR by creating a single entry field. This ensures that we have the correct number of SAL elements on the page.
APEX_ITEM. MULTI_ROW_UPDATE is the "manual" version of the MRU that you would normally get with a form of table and works for above normal as sql based query reports. The format of this very strict is that you must always allow for two primary keys. See the text of presentation here: http://download.oracle.com/docs/cd/B28359_01/appdev.111/b32258/api.htm#CHDFDACC
Andy
-
How to extract a value of sql xml column clob data
Hi guys,.
I need help with the following. I have a column with data type xml (clob data). I need to extract the information in the < RI4 > tag and the < RI6 > tag.
I truncated the data, but there is a repetition of the < RI4 > tag and consequenty internal to that tag RI6. However, each tag RI4 and RI6 has different data.I would be grateful if you can help me with this:
<a xsi:schemaLocation="som location.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:somlocation"> <b>Some stuff here</b> <c> <someinfo>blah</someinfo> <someinfo2>blah2</someinfo2> </c> <EffectiveDateTime>2015-10-01T00:00:00+10:00</EffectiveDateTime> <CurrencyCode>AUD</CurrencyCode> <RequiredInformation> <RequiredInformation2> <RequiredInformation3> <RI4>someinfo</RI4> <RI5> <RI6> <a1>1</a1> <b1>9.13</b1> </RI6> <RI6> <a1>2</a1> <b1>8.75</b1> </RI6> <RI6> <a1>3</a1> <b1>78.90</b1> </RI6> <RI6> <a1>4</a1> <b1>200</b1> </RI6> <RI6> <a1>5</a1> <b1>17.59</b1> </RI6> </RI5> </RequiredInformation3> </RequiredInformation2> </RequiredInformation> </a>
I think that since it's the repetition I might need to make some sort of PL/SQL programming, but I really need help here to build this announcement also a way to extract the information.
Any help would be greatly appreciated.
Kind regards
You can parse your XML like this
SQL> with t 2 as 3 ( 4 select 5 ' 6 Some stuff here 7
8 11blah 9blah2 102015-10-01T00:00:00+10:00 12AUD 1314 42 ' xml_str 43 from dual 44 ) 45 select t1.ri4, t2.a1, t2.b1 46 from t 47 , xmltable 48 ( 49 xmlnamespaces(default 'urn:somlocation', 'http://www.w3.org/2001/XMLSchema-instance' as "xsi") 50 , '/a/RequiredInformation/RequiredInformation2/RequiredInformation3' passing xmltype(t.xml_str) 51 columns 52 ri4 varchar2(10) path 'RI4' 53 , ri5 xmltype path 'RI5' 54 ) t1 55 , xmltable 56 ( 57 xmlnamespaces(default 'urn:somlocation') 58 , '/RI5/RI6' passing t1.ri5 59 columns 60 a1 number path 'a1' 61 , b1 number path 'b1' 62 ) t2; RI4 A1 B1 ---------- ---------- ---------- someinfo 1 9.13 someinfo 2 8.75 someinfo 3 78.9 someinfo 4 200 someinfo 5 17.59 SQL>15 4116 40someinfo 1718 3919 221 209.13 2123 262 248.75 2527 303 2878.90 2931 344 32200 3335 385 3617.59 37 -
Parse the XML file and extract data
I want to parse a XML file and get the data as columns.
Input country.xml file:
<?xml version="1.0" encoding="UTF-8"?> <MAS Action="Insert"> <Country ObjectId="100000000000000009" VersionId="8"><Id>1</Id><NlTexts><Name Language="de">Land1</Name><Name Language="en">Country1</Name></NlTexts></Country> <Country ObjectId="100000000000000033" VersionId="2"><Id>2</Id><NlTexts><Name Language="de">Land2</Name><Name Language="en">Country1</Name></NlTexts></Country> </MAS>
I would like to analyze the xmlfile to get the following result
Required result:
col1 col2 col3 1 Land1 Country1 2 Land2 Country2
or alternatively
col1 col2 1 Land1 1 Country1 2 Land2 2 Country2
I tried the extract function
select extract((XMLTYPE(BFILENAME('XML_DAT_DIR', 'country.xml'), NLS_CHARSET_ID('AL32UTF8'))) , '/*/*/Id') as "xdata" from dual; xdata ------------------------ <Id>1</Id><Id>2</Id>
and XMLTABLE (but how can I add countries now)
SELECT * FROM XMLTABLE('/*/*/Id' PASSING XMLTYPE(BFILENAME('XML_DAT_DIR', 'country.xml'), NLS_CHARSET_ID('AL32UTF8')) ) ; COLUMN_VALUE ------------------------ <Id>1</Id> <Id>2</Id>
DB version 11.2.0.3 on Windows 64-bit
Thank you
Tim
Here are a few examples.
For your output required:
SELECT *.
FROM XMLTable)
"/ MAS/country".
from XMLType (bfilename ('TEST_DIR', 'country.xml'), nls_charset_id ('AL32UTF8'))
number of columns col1 way "Id".
, col2 varchar2 (30) path "NlTexts/name [1].
, col3 varchar2 (30) path "NlTexts/name [2]»
)
;
or, if the Language attribute is significant:
SELECT *.
FROM XMLTable)
"/ MAS/country".
from XMLType (bfilename ('TEST_DIR', 'country.xml'), nls_charset_id ('AL32UTF8'))
number of columns col1 way "Id".
col2 varchar2 (30) path "NlTexts/Name[@Language="de"]"
col3 varchar2 (30) path "NlTexts/Name[@Language="en"]"
)
;
For your alternate exit:
SELECT x1.col1
x2.col2
-, x2.col3
FROM XMLTable)
"/ MAS/country".
from XMLType (bfilename ('TEST_DIR', 'country.xml'), nls_charset_id ('AL32UTF8'))
number of columns col1 way "Id".
, path of xmltype names ' NlTexts/name '.
) x 1
XMLTable)
"/ Name".
in passing x1.names
path of column col2 varchar2 (30) '.'
-, col3 to ordinalite
) x 2
;
(uncomment col3 to see what he does)
or in a shorter way:
SELECT *.
FROM XMLTable)
' for $i/MAS/country
, $j in $ NlTexts/i/name
Returns the r element {$i / Id, $j}'
from XMLType (bfilename ('TEST_DIR', 'country.xml'), nls_charset_id ('AL32UTF8'))
number of columns col1 way "Id".
, col2 varchar2 (30) path 'name '.
) ;
-
Re-apply the sort column on new data grid.
I have an AdvancedDataGrid that is subservient to the other (parent) AdvancedDataGrid so that when the user selects an item in the main grid, the data for changes in child grid "child." If the user has sorted the child grid based on column X (for example), and then selects a different item in the main grid, the new data in the grid of the child are is more sorted. So, the user must re - select X column to sort these new data.
Is it possible to retain the preferences of the user on the columns grid uses to sort data? Is there a way to tell either the grid to maintain this sort of preference OR, instead of a 'feature', implement myself?
If your data is ArrayCollections you can assign a ListCollectionView
to the dataProvider to your child AdvancedDataGrid and assign
your data collection ArrayCollection for the "list" property of the
ListCollectionView. When you want to change the data in the grid of the child,
reassign the list property of ListCollectionView. In this way you avoid
reassign the dataProvider on the grid of the child directly, this is what
causes the grid reset.
For a similar example with XML data, take a look at this thread:
-
SQLLDR: How to fill the empty columns with specific data by default?
Hello
We are 11G
Here is a complete example:
(1) the definition of the table:
(2) the CTL:create table IMPORT_PRJ_TIMESHEETS ( RESSOURCE_CODE VARCHAR2(20), REFERENCE_DATE VARCHAR2(20), STATUS VARCHAR2(20), PROJET_CODE VARCHAR2(50), TACHE_ID VARCHAR2(100), TACHE_DESC VARCHAR2(250), RAF NUMBER, JOUR1 NUMBER, JOUR2 NUMBER, JOUR3 NUMBER, JOUR4 NUMBER, JOUR5 NUMBER, JOUR6 NUMBER, JOUR7 NUMBER, IMPORT_DATE DATE );
LOAD DATA CHARACTERSET WE8ISO8859P1 APPEND INTO TABLE IMPORT_PRJ_TIMESHEETS -- Pour eliminer la ligne d'en-tete WHEN PROJET_CODE != 'ID projet' FIELDS TERMINATED BY '*-*' OPTIONALLY ENCLOSED BY '"' ( RESSOURCE_CODE CONSTANT '!RESSOURCE_CODE!' , REFERENCE_DATE CONSTANT '!REFERENCE_DATE!' , STATUS CONSTANT '!STATUS!' , PROJET_CODE CHAR , TACHE_ID CHAR , TACHE_DESC CHAR , RAF CHAR "TO_NUMBER( :RAF, '999G999D99')" , JOUR1 CHAR , JOUR2 CHAR , JOUR3 CHAR , JOUR4 CHAR , JOUR5 CHAR , JOUR6 CHAR , JOUR7 CHAR , IMPORT_DATE SYSDATE ) {code} 3) the datafile : {code} ID projet*-*ID tâche*-*Tâche/Description*-*RàF*-*lun. 13/07*-*mar. 14/07*-*mer. 15/07*-*jeu. 16/07*-*ven. 17/07*-*sam. 18/07*-*dim. 19/07*-* FR-FR-NT2300135*-* *-*GAMMAWEB - Coordination*-*0,00*-* *-* *-* *-*8,00*-*8,00*-* *-* *-* *-* *-*Holiday*-* *-* *-*8,00*-* *-* *-* *-* *-* *-* *-* *-*Special leave*-* *-*8,00*-* *-* *-* *-* *-* *-* *-* *-* *-*Vacation*-* *-* *-* *-*8,00*-* *-* *-* *-* *-* {code} - As you can see, the datafile delimiter is "*-*" .... there's no pb about this. - Also, there are 5 lines in the datafile. Currently, the _*load status*_ is : - Line 1 is the header >>> not loaded, and that's fine with me. - Line 2 is successfully loaded - Line 3 / Line 4 / Line 5 : are not loaded .. but I need these lines ... *What I'd like to get is to successfully load lines 3 to 5 with a default values for the first 3 columns (project/task ID/ task desc)* I hope it's clear enough and that you will be able to provide a good answer .. Thanks in advance, Olivier
In your example, the only ranked with value on all lines is TACHE_DESC.
If this field is always filled, try this:
WHEN TACHE_DESC! = "Task/Description".Concerning
Maybe you are looking for
-
Comparing the Portégé R500-10J and R500 - 11 c
Hello Anyone know the difference between Portege R500-10J and Portégé R500 - 11 c?
-
* 85.apk popup on Lenovo vibe p1m
From time to time * 85.apk appears on the screen, * is the replacement of some Chinese characters. What is this apk and why it appears. Phone is bought in Croatia, to the retailer. What is a bloatware? Thanks for help.
-
I can't change the background on my laptop under control panel > display
-
My old computer which runs vista had to be rebuilt recently, and because I didn't have a drive of MSOffice free version of 'office' was put on. Can I have access to MSOffice once again, as I had paid for a download earlier (no disc)? Laughing withou
-
ADF VO outcome from the choice in other VO
HelloI have first VO which returns the listSelectLOT_NUMBER, ID_LOT_RULEOfDWH. D_LOT_NUMBERwhereID_PERSON = 655It is on the page, "ADF a choise.And I want to second from VO of choice first voSelectLOT_RULE, LOT_RULE_COMMENT, ID_LOT_RULEOfDWH. D_LOT_R