list targets

$p=new XML::Parser;$p->setHandlers(Start=>&b);$p->parsefile("-");sub b{($i,$e,%a)=@_;if($e eq"Target"){print$a{"NAME"}.":".$a{"TYPE"}}} — laurentsch (@laurentsch) September 19, 2017 As correctly pointed out by dhoogfr , the proper way to list targets on an agent is to use list target $ emctl config agent listtargets Oracle Enterprise Manager Cloud Control 13c Release 2 Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved. [, host]… Continue reading list targets

xml and powershell : using XPATH

I wrote about powershell [xml] yesterady : xml and powershell Let’s see how to use XPATH expressions in Powershell John Jack With the [xml] datatype, we create a navigator : (([xml](GC foo.xml)).psbase.createnavigator().evaluate( ‘//emplist/emp[@no=”1″]/ename/text()’ ))|%{$_.Value} John I have not been seduced by a Microsoft product since ages, but I must say I felt with love in… Continue reading xml and powershell : using XPATH

xml and powershell

I wrote about the unix command-line utility xmllint there : extract xml from the command line Let’s do the same exercice in Powershell PS> gc foo.xml John Jack Simply use [xml] datatype ! (([xml](GC foo.xml)).emplist.emp|Where{$”1″}).ename John Powershell rules!

extract xml from the command line

I just discovered this morning this cool utility in my /bin directory : xmllint You can use it to extract values from your xml files within your shell scripts $ cat foo.xml John Jack $ echo ‘cat //emplist/emp[@no=”1″]/ename/text()’| xmllint –shell foo.xml | sed -n 3p John I like this !

select from comma-separated list

This is asked over and over in the forums, but why not proposing an 11g solution here 😉 create table t(description varchar2(12) primary key, numbers varchar2(4000)); insert into t(description, numbers) values (‘PRIME’,’2,3,5,7′); insert into t(description, numbers) values (‘ODD’,’1,3,5,7,9′); commit; DESCRIPTION NUMBERS PRIME 2,3,5,7 ODD 1,3,5,7,9 Now I want to unpivot numbers in rows select description,(column_value).getnumberval()… Continue reading select from comma-separated list

Categorized as 11g, sql, xml Tagged

old-fashion listagg

Yesterday I had my first session about XML, today I have one about SQL Model Ok, it was the first time I spoke about XML so I did not really now where to focus. XML is so big, you have XQUERY, XPATH, dozens of XML functions in the database. One of the XML function is… Continue reading old-fashion listagg

Categorized as sql, xml Tagged